Code Highlighter (26 languages)
WebEverything runs locally in your browser — nothing is uploaded
Colourise a block of code so it survives being pasted somewhere else. There are two routes. In preview mode the page shows the highlighted block directly; select it and copy, and the browser puts the DOM and its styles on the clipboard — the colours stay when you paste into slides, Word or email, which is the least-effort path and needs no special steps. HTML mode emits a snippet with inline styles that drops straight into a blog, static site or email template. Inline styles rather than classes, because the destination has no stylesheet of ours: `class="hljs-keyword"` is just uncoloured text over there. The palette matches the site's own code blocks, in light and dark.
Features
- 26 languages: JavaScript, TypeScript, Python, Go, Rust, Java, C++, C#, PHP, Ruby, SQL, YAML, JSON, XML and more
- Preview mode: select and copy with the colours, straight into slides or Word
- HTML mode: inline-styled HTML that keeps its colours anywhere
- Light and dark palettes matching the site's code blocks
- Nothing to click — code is highlighted as you type
- Past 20,000 characters it falls back to plain text rather than freezing the page
How to use
- Paste code and pick a language
- Preview mode shows the highlighted result immediately
- Select and copy for slides; switch to HTML mode for a page or email
- HTML mode offers a light or dark palette
FAQ
- How do I paste coloured code into slides?
- In preview mode, select the highlighted block with the mouse and press Ctrl+C (⌘+C on a Mac), then paste directly into your slides — the browser writes the DOM and its styles to the clipboard, so the colours survive. Do not use the "copy all" button for this: that takes the plain text, which pastes without colour.
- Why inline styles in HTML mode?
- Because the destination has none of this site's CSS. Output like `class="hljs-keyword"` would be uncoloured text in your blog — a highlighter's class names only mean something when the matching stylesheet is present. Inline styles put the colour on each tag, so they work anywhere.
- How many languages are supported?
- Twenty-six, covering the main languages and config formats in day-to-day work. That list has been pruned by size: every grammar registered adds to the page's download. So the cost is measured before a language is added (the method is written down in the README).
- Is the code uploaded?
- No. Highlighting happens entirely in the browser and the page sends no requests — internal code never leaves the machine.
Related tools
JSON Formatter
FormatFormat, validate and minify JSON in a collapsible tree with syntax highlighting and line numbers. Search, edit, delete or convert to Python dicts.
Shell Formatter
FormatIndent a shell script by structure: if/fi, for/done, case/esac and functions. Only leading whitespace changes; heredocs stay intact.
CSS Formatter
FormatFormat CSS online: one declaration per line, selectors split at commas. Minify only strips structural whitespace, keeping meaningful spaces in values.
URL Parser
WebParse a URL into scheme, host, port, path, query parameters and fragment, with each parameter shown raw and decoded. Runs entirely in your browser.
User-Agent Parser
WebParse a user agent into browser, version, OS, device type and engine, and see which rules matched. Pattern matching only. Runs entirely in your browser.
HTTP Status Codes
WebLook up an HTTP status code for its meaning, 1xx–5xx class, typical uses and common traps. Runs entirely in your browser.