Code Syntax Highlighter
"Copy with colours" pastes coloured code into Word, Google Docs, email and slides. The HTML version needs the highlight.js theme stylesheet on your page.
Code Syntax Highlighter
Code is much easier to read with syntax colouring. Paste a snippet, let the highlighter detect the language (or choose it), pick a theme, and copy the result with colours into Word, Google Docs, PowerPoint, Keynote or an email, or copy the HTML for a web page. It uses highlight.js, the library behind many documentation sites.
How to use Code Syntax Highlighter
- Paste your code.
- Choose the language, or leave it on automatic detection.
- Choose a light or dark theme.
- Click Copy with colours to paste into documents, or copy the HTML.
When it comes in handy
- Code in presentations and teaching materials.
- Readable snippets in emails and documentation.
- Highlighted examples for a blog post.
Frequently asked questions
Why does the HTML look plain on my site?
Related guides
-
JSON vs XML vs CSV: Choosing the Right Data Format for Your Project
JSON, XML and CSV each solve a different problem. Here is how to pick the right one, plus tools to convert and validate between them.
-
How to Fix Invalid JSON: The 8 Most Common Errors
Trailing commas, single quotes, unquoted keys and the other mistakes that break JSON, with before-and-after examples and a quick way to find the problem.
-
Unix Timestamps Explained: Epoch Time for Humans
What a Unix timestamp is, why it counts from 1970, seconds vs milliseconds, time zones, the year 2038 problem, and how to convert timestamps quickly.