Markdown To Custom Template

Login

Email
Password

Don't have an account yet?

Go to Sign up

Input Data
Sample {{ showCoderInput ? 'Choose File' : 'Enter Data' }}

                                
Valid Data Invalid Data — Cannot parse as table
Online Table Editor
Row Col Row Col
Transpose Clear Delete Empty Deduplicate
ABC abc Abc
Replace
First Row as Header
{{ displayRows.length }} rows x {{ displayHeaders.length }} columns{{ firstRowAsHeader ? ' (1 header)' : '' }} {{ selectedRows.length > 0 ? selectedRows.length + ' selected' : '' }}
Output Data ({{ magicFormatDisplayName }})
{{ copied ? 'Copied!' : 'Copy to Clipboard' }} Download File
Properties
Convert table data online — paste, edit, and download.

Built-in Template:
Row Template:
Header Template:
Footer Template:
Convert Restart
Insert Row Below
Insert Row Above
Insert Column Right
Insert Column Left
Delete Row {{ contextMenu.row + 1 }}
Delete Column {{ contextMenu.col + 1 }}
Clear Cell
Clear Row
Case sensitive Use regex Cancel Replace All

What Is the Markdown To Custom Template Converter?

The Markdown To Custom Template Converter on A.Tools transforms Markdown pipe-delimited tables into any text format you define — SQL statements, HTML select tags, PHP arrays, C arrays, JSON objects, JIRA tables, LDIF entries, URL query parameters, shell commands, and more. All processing runs in your browser. No data leaves your device.

Unlike fixed-format converters, this tool gives you full control over the output through a template engine with three template fields (Header, Row, Footer) and a powerful variable syntax. Choose from 18 built-in templates or write your own.

How to Convert Markdown Tables with Custom Templates?

Step 1: Provide Your Markdown Data

Click Enter Data to paste a Markdown table into the input area, or click Choose File to drag and drop a .md file. Press Sample to load example data.

Step 2: Edit in the Online Table Editor

Once parsed, an interactive spreadsheet appears. Use the toolbar to:

  • Add or delete rows and columns

  • Transpose the table (swap rows and columns)

  • Remove duplicate rows

  • Delete empty rows and columns

  • Change text case (UPPERCASE, lowercase, Capitalize)

  • Find and replace values — supports case-sensitive search and regex

  • Toggle First Row as Header to define column names (used in {hN} variables)

Right-click any cell for context-menu operations.

Step 3: Choose a Template

In the Properties panel:

  • Built-in Template: Select from 18 pre-built formats, or choose "Make your Magic" for a blank template

  • Row Template (required): The pattern applied to every data row

  • Header Template (optional): Applied once before all rows (using the first row's data)

  • Footer Template (optional): Applied once after all rows (using the last row's data)

Step 4: Export

Click Convert to generate output. Use Copy to Clipboard or Download File to save the result.

Key Features

  • Two input modes: Paste Markdown directly or upload a .md file via drag-and-drop

  • Full table editor: Edit, transpose, deduplicate, find-and-replace before converting

  • 18 built-in templates: SQL, PHP, C, JSON, HTML, JIRA, LDIF, CSV, URL params, and more

  • Custom template engine: Define your own output format with header, row, and footer templates

  • Powerful variable syntax: {$N} for values, {hN} for headers, {NR} for row numbers, {x expr} for JS expressions

  • Method chaining: .upper, .lower, .trim, .replace() on any variable

  • Client-side processing: Files never leave the browser — zero data upload

  • Undo/Redo: Full edit history with revert support

  • Context menu: Right-click for quick row/column/cell operations

  • Header toggle: Treat the first row as column names or regular data

  • Validation indicator: Real-time feedback on input validity

Template Syntax Reference

Core variables

SyntaxDescriptionExample
{$1}Value of column 1 (1-indexed)Alice
{$2}Value of column 230
{$N}Value of column NAny column
{h1}Header of column 1Name
{h2}Header of column 2Age
{hN}Header of column NAny column header
{NR}Current row number (1-indexed)1, 2, 3
{NR+5}Row number plus offset6 for row 1
{ENR}Total number of data rows4
{x expr}Evaluate JavaScript expression{x $1 + $2}
\{ / \}Literal { or } character\{$1\}{$1}

Method chaining

Append a dot-method to any variable:

MethodEffectExample
.upperConvert to UPPERCASE{$1.upper}ALICE
.lowerConvert to lowercase{$1.lower}alice
.trimRemove leading/trailing whitespace{$1.trim}
.replace("a","b")Replace text{$1.replace(" ","_")}New_York

Column indexing

Columns can be referenced by number (1, 2, 3) or letter (A, B, C, ..., Z, AA, AB).

Template fields

FieldRequiredApplied To
Row TemplateYesEvery data row
Header TemplateNoOnce, before all rows (uses first row's data)
Footer TemplateNoOnce, after all rows (uses last row's data)

Escaping

Use \{ and \} to output literal curly braces without triggering variable substitution.

18 Built-In Templates

SQL: Update example

UPDATE table SET {h2} = '{$2}' WHERE {h1} = '{$1}';

Output:

UPDATE table SET Age = '30' WHERE Name = 'Alice';
UPDATE table SET Age = '25' WHERE Name = 'Bob';

PHP Array

<?php$array = [
   ['Alice', '30', 'NY'],
   ['Bob', '25', 'London'],
];

C Array

char *array[] = {
   "Alice",
   "Bob",
};

HTML SELECT tag

<select>
   <option value="Alice">30</option>
   <option value="Bob">25</option>
</select>

JIRA Table

||Name||Age||City||
|Alice|30|NY|
|Bob|25|London|

JSON for 2 fields

{"Alice": "30"}
{"Bob": "25"}

LDIF for 3 fields

dn: Alice
Age: 30
City: NY

URL Query Params

Name=Alice&Age=30&City=NY

CSV with Semicolons

Alice;30;NY
Bob;25;London

Double Quote Cells

"Alice" "30" "NY"

Single Quote Cells

'Alice' '30' 'NY'

RENAME: by Replace()

rename "Alice" "30"

RENAME COLUMN

RENAME COLUMN Alice TO 30

Batch Create Empty File

touch Alice
touch Bob

Batch Create File with Content

echo "30" > Alice
echo "25" > Bob

Column... Rows

Alice
30
NY

Make your Magic

Blank template — fill in your own Row Template, Header Template, and Footer Template.

Use Cases: What Can You Generate?

ScenarioTemplate Pattern
SQL INSERT statementsINSERT INTO table ({h1},{h2}) VALUES ('{$1}','{$2}');
SQL UPDATE statementsBuilt-in template available
HTML dropdownsBuilt-in template available
JIRA table markupBuilt-in template available
PHP arraysBuilt-in template available
C string arraysBuilt-in template available
JSON key-value pairsBuilt-in template available
LDIF directory entriesBuilt-in template available
URL query stringsBuilt-in template available
Shell scriptsecho "Processing {$1}..." && ./script --name "{$1}"
Configuration files{$1}={$2} (key=value format)
Batch file creationBuilt-in template available
Email merge templatesDear {$1}, your {$2} is {$3}.
Docker commandsdocker run --name {$1} -p {$2} {$3}
curl commandscurl -X POST -d '{$1}={$2}' http://api.example.com
Python dictionaries'{$1}': '{$2}',
CSS custom properties--{h1.lower}: {$1};
Markdown links[{$1}]({$2})

Custom SQL INSERT Example

Row Template:

INSERT INTO users ({h1}, {h2}, {h3}) VALUES ('{$1}', '{$2}', '{$3}');

Output:

INSERT INTO users (Name, Age, City) VALUES ('Alice', '30', 'NY');
INSERT INTO users (Name, Age, City) VALUES ('Bob', '25', 'London');

Custom Docker Example

Row Template:

docker run -d --name {$1.lower} -p {$2}:80 {$3}

Output:

docker run -d --name webapp -p 8080:80 nginx:latest
docker run -d --name api -p 3000:80 node:18

Custom Email Merge Example

Header Template:

Subject: {h1} Report - {h2}

Row Template:

Dear {$1},
Your score on the {$2} exam is {$3}.

Frequently Asked Questions (FAQ)

  • Does this tool upload my files to a server?

    No. All file parsing and conversion runs in your browser using JavaScript. Your data stays on your device. A.Tools never receives, stores, or transmits your file contents.

  • What Markdown table formats are supported?

    The tool supports standard pipe-delimited Markdown tables following the CommonMark specification, including tables with or without leading/trailing pipes and alignment indicators.

  • How do I reference columns in templates?

    Use {$1} for the first column's value, {$2} for the second, and so on. Use {h1}, {h2} for column headers. See the Template Syntax Reference above for the complete variable list.

  • What does {NR} mean?

    {NR} is the current row number, starting from 1. Use {NR+5} to add an offset (e.g., for field numbers in a protobuf definition starting at 6).

  • What does {ENR} mean?

    {ENR} is the total number of data rows. Useful for progress indicators or summary lines in the footer template.

  • Can I use JavaScript expressions in templates?

    Yes. Use the {x expr} syntax to evaluate JavaScript. For example, {x $1 + $2} adds the values of columns 1 and 2.

  • The Header Template is processed once before all rows (using the first row's data). The Footer Template is processed once after all rows (using the last row's data). Both are optional. Use them for opening/closing syntax like char *array[] = { and };.

  • How do I escape curly braces?

    Use \{ and \} to output literal curly braces. For example, \{$1\} produces the literal text {$1} without variable substitution.

  • Can I edit the table before converting?

    Yes. After parsing, the full table editor lets you modify cells, add or remove rows and columns, transpose, deduplicate, change text case, and find-and-replace values.

  • Is there a file size limit?

    Processing is client-side, so the limit depends on your browser's memory. Tables with tens of thousands of rows work reliably on modern browsers.

Featured Tools

Featured tools that you might find useful.

Popular Tools

List of popular tools that users love and frequently use.

New Tools

The latest tools added to our collection, designed for you.

Topics

The tools grouped by topics to quickly find what you need.
Free online Excel to JSON converter. Transform XLSX, XLS, XLSM files into JSON arrays, objects, or keyed formats instantly in your browser — no upload, 100% private.

Excel To JSON

Free online Excel to JSON converter. Transform XLSX, XLS, XLSM files into JSON arrays, objects, or keyed formats instantly in your browser — no upload, 100% private.
Free Excel to CSV converter. Convert XLSX, XLS, XLSM to CSV instantly in your browser. No upload, 100% private. Edit, transpose, deduplicate before exporting.

Excel To CSV

Free Excel to CSV converter. Convert XLSX, XLS, XLSM to CSV instantly in your browser. No upload, 100% private. Edit, transpose, deduplicate before exporting.
Free online Excel to SQL converter. Generate CREATE TABLE and INSERT statements from spreadsheets for MySQL, PostgreSQL, SQLite, and SQL Server. Supports batch insert, primary keys, and type inference.

Excel To SQL

Free online Excel to SQL converter. Generate CREATE TABLE and INSERT statements from spreadsheets for MySQL, PostgreSQL, SQLite, and SQL Server. Supports batch insert, primary keys, and type inference.
Free online Excel to ASCII table converter with 10 border styles (MySQL, Unicode, reStructuredText, and more). Add code comment wrappers in 8 languages. Supports text alignment. Client-side processing.

Excel To ASCII Table

Free online Excel to ASCII table converter with 10 border styles (MySQL, Unicode, reStructuredText, and more). Add code comment wrappers in 8 languages. Supports text alignment. Client-side processing.