DEV Community

gofortool
gofortool

Posted on

I built a free Markdown-to-LinkedIn formatter - here's the Unicode hack that makes it work

If you draft posts with ChatGPT or Claude and paste them into LinkedIn, you've hit this: all your **bold**, *italics*, and `code` collapse into plain text with literal asterisks everywhere.

LinkedIn doesn't support Markdown. It never will. But there's a workaround hiding in the Unicode spec β€” and I turned it into a free tool. Here's how it works under the hood.

## The problem

LinkedIn's post editor strips formatting. Markdown symbols (`**`, `*`, `#`) are rendered literally. So AI-generated drafts look broken the moment you paste them.

## The hack: Unicode Mathematical Alphanumeric Symbols

Unicode block U+1D400–U+1D7FF contains full alphabets in bold, italic, and bold-italic β€” as *distinct characters*. `𝗕𝗼𝗹𝗱` isn't styled text; each letter is its own code point. LinkedIn can't strip styling that isn't styling.

The mapping is pure arithmetic:

Enter fullscreen mode Exit fullscreen mode


js
function toBold(char) {
const code = char.codePointAt(0);
if (code >= 65 && code <= 90) // A-Z
return String.fromCodePoint(0x1D5D4 + (code - 65));
if (code >= 97 && code <= 122) // a-z
return String.fromCodePoint(0x1D5EE + (code - 97));
if (code >= 48 && code <= 57) // 0-9
return String.fromCodePoint(0x1D7EC + (code - 48));
return char; // punctuation passes through
}


Then it's a small Markdown parser: walk the text, detect `**…**` and `*…*` spans, transform the characters inside, drop the delimiters.

## The gotchas (this is where it gets interesting)

1. **Accessibility.** Screen readers choke on math symbols β€” some read `𝗛𝗲𝗹𝗹𝗼` as "mathematical sans-serif bold capital H…". So use it for short emphasis, never whole paragraphs.
2. **Search.** LinkedIn search doesn't normalize these code points, so bolded keywords become unsearchable. Keep your key hashtags/keywords in plain text.
3. **Bullets.** Markdown `- item` lists need conversion to `β€’` (U+2022) with real line breaks β€” LinkedIn collapses consecutive newlines inconsistently on mobile vs desktop, so you normalize to single `\n` + spacing chars.
4. **Headers.** There's no Unicode "large text", so `## Header` becomes bold + blank line β€” a lossy but readable downgrade.

## Try it

I wrapped all of this into a free, client-side tool (nothing is sent to a server): [Markdown to LinkedIn Formatter](https://gofortool.com/en/tools/ai/markdown-linkedin-formatter/) β€” paste Markdown, get LinkedIn-ready text.

What other formatting hacks have you found for platforms that "don't support" formatting? πŸ‘‡
Enter fullscreen mode Exit fullscreen mode

Top comments (0)