diff --git a/src/tools/markdown-table-generator/index.ts b/src/tools/markdown-table-generator/index.ts
new file mode 100644
index 00000000..df3bc46d
--- /dev/null
+++ b/src/tools/markdown-table-generator/index.ts
@@ -0,0 +1,12 @@
+import { defineTool } from '../tool';
+
+export const tool = defineTool({
+ name: 'Markdown Table Generator',
+ path: '/markdown-table-generator',
+ description: 'Create GitHub-flavored Markdown tables with a visual editor.',
+ keywords: ['markdown', 'table', 'generator', 'gfm', 'github'],
+ component: () => import('./markdown-table-generator.vue'),
+ icon: defineAsyncComponent(() => import('@vicons/tabler/es/Table')),
+ createdAt: new Date('2026-07-11'),
+ category: 'Markdown',
+});
diff --git a/src/tools/markdown-table-generator/markdown-table-generator.service.test.ts b/src/tools/markdown-table-generator/markdown-table-generator.service.test.ts
new file mode 100644
index 00000000..e90884a1
--- /dev/null
+++ b/src/tools/markdown-table-generator/markdown-table-generator.service.test.ts
@@ -0,0 +1,50 @@
+import { describe, expect, it } from 'vitest';
+import { createMarkdownTable, escapeMarkdownTableCell, generateMarkdownTable } from './markdown-table-generator.service';
+
+describe('markdown-table-generator service', () => {
+ describe('createMarkdownTable', () => {
+ it('creates a table with default headers and empty rows', () => {
+ expect(createMarkdownTable({ rows: 1, columns: 2 })).toEqual({
+ headers: ['Column 1', 'Column 2'],
+ alignments: ['left', 'left'],
+ rows: [['', '']],
+ });
+ });
+ });
+
+ describe('escapeMarkdownTableCell', () => {
+ it('escapes pipes and converts line breaks to br tags', () => {
+ expect(escapeMarkdownTableCell(' foo | bar\nbaz ')).toBe('foo \\| bar
baz');
+ });
+ });
+
+ describe('generateMarkdownTable', () => {
+ it('generates a markdown table with column alignment', () => {
+ expect(generateMarkdownTable({
+ headers: ['Name', 'Count', 'Notes'],
+ alignments: ['left', 'right', 'center'],
+ rows: [
+ ['Alpha', '10', 'Ready'],
+ ['Beta', '3', 'Needs review'],
+ ],
+ })).toMatchInlineSnapshot(`
+ "| Name | Count | Notes |
+ | :--- | ---: | :---: |
+ | Alpha | 10 | Ready |
+ | Beta | 3 | Needs review |"
+ `);
+ });
+
+ it('pads uneven rows to keep the table shape valid', () => {
+ expect(generateMarkdownTable({
+ headers: ['Name'],
+ alignments: ['left'],
+ rows: [['Alpha', 'Extra']],
+ })).toMatchInlineSnapshot(`
+ "| Name | |
+ | :--- | :--- |
+ | Alpha | Extra |"
+ `);
+ });
+ });
+});
diff --git a/src/tools/markdown-table-generator/markdown-table-generator.service.ts b/src/tools/markdown-table-generator/markdown-table-generator.service.ts
new file mode 100644
index 00000000..016591ca
--- /dev/null
+++ b/src/tools/markdown-table-generator/markdown-table-generator.service.ts
@@ -0,0 +1,82 @@
+import { JsonLayout, MarkdownTable2Json } from 'mdt2json';
+import { translate as t } from '@/plugins/i18n.plugin';
+
+export type MarkdownTableAlignment = 'left' | 'center' | 'right';
+
+export interface MarkdownTable {
+ headers: string[];
+ alignments: MarkdownTableAlignment[];
+ rows: string[][];
+}
+
+const alignmentSeparators: Record = {
+ left: ':---',
+ center: ':---:',
+ right: '---:',
+};
+
+export function pasteMarkdownTable(markdownContent: string): MarkdownTable | null {
+ const transpiler = new MarkdownTable2Json({
+ markdownString: markdownContent.replace(//g, ' '), // Remove HTML comments
+ layout: JsonLayout.AoS,
+ minify: true,
+ });
+ const output_markdown = transpiler.transform();
+ if ([...(output_markdown?.match(/```json/g) || [])].length > 1) {
+ throw new Error(t('tools.html-to-data.texts.error-multiple-json-blocks'));
+ }
+ const output_first_codeblock = output_markdown?.match(/```json\n(.*?)\n```/s)?.[1] || '[]';
+ const data = JSON.parse(output_first_codeblock);
+ return {
+ headers: Object.keys(data[0] || {}),
+ alignments: Object.keys(data[0] || {}).map(() => 'left'),
+ rows: data.map((row: Record) => Object.values(row)),
+ };
+}
+
+export function createMarkdownTable({
+ rows = 2,
+ columns = 3,
+}: { rows?: number; columns?: number } = {}): MarkdownTable {
+ return {
+ headers: Array.from({ length: columns }, (_, index) => `Column ${index + 1}`),
+ alignments: Array.from({ length: columns }, () => 'left'),
+ rows: Array.from({ length: rows }, () => Array.from({ length: columns }, () => '')),
+ };
+}
+
+export function escapeMarkdownTableCell(value: string): string {
+ return value
+ .replace(/\|/g, '\\|')
+ .replace(/\r\n|\r|\n/g, '
')
+ .trim();
+}
+
+function getColumnCount(table: MarkdownTable): number {
+ return Math.max(table.headers.length, table.alignments.length, ...table.rows.map((row) => row.length));
+}
+
+function getCells(cells: string[], columns: number): string[] {
+ return Array.from({ length: columns }, (_, index) => escapeMarkdownTableCell(cells[index] ?? ''));
+}
+
+function formatRow(cells: string[]): string {
+ return `| ${cells.join(' | ')} |`;
+}
+
+export function generateMarkdownTable(table: MarkdownTable): string {
+ const columns = getColumnCount(table);
+
+ if (columns === 0) {
+ return '';
+ }
+
+ const headers = getCells(table.headers, columns);
+ const separators = Array.from(
+ { length: columns },
+ (_, index) => alignmentSeparators[table.alignments[index] ?? 'left'],
+ );
+ const rows = table.rows.map((row) => formatRow(getCells(row, columns)));
+
+ return [formatRow(headers), formatRow(separators), ...rows].join('\n');
+}
diff --git a/src/tools/markdown-table-generator/markdown-table-generator.vue b/src/tools/markdown-table-generator/markdown-table-generator.vue
new file mode 100644
index 00000000..2edd739f
--- /dev/null
+++ b/src/tools/markdown-table-generator/markdown-table-generator.vue
@@ -0,0 +1,162 @@
+
+
+
+
+
+
+
+ Import Table Data
+
+
+
+
+ {{ error }}
+
+
+
+ Add row
+ Add column
+
+
+
+
+
+
+ |
+
+ |
+ |
+
+
+
+
+ |
+
+ |
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+