Syntax highlight code in 22 languages and 7 themes as you type, then copy styled HTML or export an HTML page or a PNG image.
Initializing in your browser…
Read QR codes from a photo, a screenshot or your camera, several at once. Wi-Fi logins, contacts, events and links are laid out field by field, in your browser.
Extract the main colours of a photo as a palette with hex, RGB and HSL codes and their share of the picture, and export it as CSS, SCSS, Tailwind, JSON, CSV or GIMP.
Minify or beautify JavaScript, TypeScript, CSS, HTML, JSON, XML and SQL as you type, without touching strings or licences, and see the bytes saved.
A developer is writing a blog post about URL handling and needs the snippet highlighted correctly in a CMS that has no syntax highlighting.
JavaScript
const u = "https://example.com/a"; // real comment const re = /\/\/ not a comment/g;
Tokens as coloured
const keyword u name "https://example.com/a" string // real comment comment const keyword re name /\/\/ not a comment/g regular expression
A highlighter that looks for // anywhere would colour the second half of the URL and the whole regular expression as comments. Reading the code as tokens keeps the URL inside its string and recognises the regular expression as one unit, so only the genuine comment is grey. Copy HTML then produces a <pre> block with these colours as inline styles, which the CMS displays as is.
Paste code in any of 22 languages and see it syntax highlighted in one of seven themes as you type. Copy the result as styled HTML for a blog, email or slide, or export it as a standalone HTML page or a PNG image.
Highlighted code is easier to read in documentation, tutorials, slides and bug reports, but getting colours into a place that does not support them, such as an email, a CMS editor or a presentation, usually means taking a screenshot. This tool produces the highlighted version in three portable forms: HTML with the colours written inline, a complete HTML page, and a crisp PNG image.
Accurate colouring. Each language is read by a tokenizer that follows the language's own rules for strings, comments, numbers and keywords, rather than by a set of search patterns. That matters for the cases simple highlighters get wrong: a URL such as "https://example.com" inside a string stays a string instead of turning the rest of the line into a comment, a JavaScript regular expression containing // is recognised as a regular expression, a SQL string with a doubled quote does not end early, and a multi-line comment or template literal is coloured across every line it spans. Under the preview, a check confirms that the highlighted tokens add up to exactly the text you pasted, so nothing is ever lost or reordered.
Languages and themes. Supported languages are JavaScript, TypeScript, Python, Java, C++, C#, Go, Rust, Ruby, PHP, Swift, Kotlin, HTML, CSS, SCSS, JSON, YAML, XML, SQL, Bash, PowerShell and Markdown. For SQL you can choose the dialect (SQLite, PostgreSQL, MySQL, SQL Server or Oracle), because they disagree on how strings and quoted names are written. Themes include Dark, Light, Monokai, GitHub Dark, Dracula, Nord and Solarized Dark. Line numbers, line wrapping and font size are adjustable, and opening a file picks the language from its extension.
Exports that keep their colours. Copy HTML puts a <pre> block on your clipboard with every colour written as an inline style, so it looks the same pasted into a blog post, a wiki or an HTML email, with no stylesheet needed. Export HTML saves a complete page with the theme background. Export PNG draws the code onto an image at up to twice the screen resolution, with tabs expanded so indentation lines up; very long files are scaled to fit, and files too long for a single image are pointed to the HTML export instead.
Honest about limits. For each language the tool states what its rules are based on and anything it does not recognise, for example JSX markup inside JavaScript, which is coloured as ordinary JavaScript. Highlighting runs entirely in your browser, so proprietary code is never uploaded.
Export a sharp PNG of a snippet for a presentation, a tweet or a LinkedIn post, in a theme that matches your slides.
Paste highlighted HTML into a CMS or wiki that has no syntax highlighting of its own.
Send a readable, coloured code example in an email, where external stylesheets and scripts are not allowed.
Show a highlighted excerpt with line numbers so students or reviewers can refer to exact lines.
In const u = "https://example.com/a"; // real comment, the URL is coloured as part of the string and only "// real comment" is coloured as a comment.
A function indented with tabs exports to PNG with each tab expanded to the next four-column stop, so nested blocks line up exactly as they do in an editor.
A PostgreSQL query copied with Copy HTML and pasted into an email keeps keyword, string and comment colours, because every colour is an inline style.
JavaScript, TypeScript, Python, Java, C++, C#, Go, Rust, Ruby, PHP, Swift, Kotlin, HTML, CSS, SCSS, JSON, YAML, XML, SQL, Bash, PowerShell and Markdown. JSX and TSX are highlighted as plain JavaScript and TypeScript.
Press Copy HTML and paste into the HTML or source view of your editor. The colours are written as inline styles on each piece of code, so they survive email clients and editors that strip stylesheets. In editors without an HTML view, export a PNG instead.
The PNG export renders the code at up to twice screen resolution with consistent padding and theme colours, without your editor's interface around it. The HTML export keeps the text selectable and searchable, which a screenshot cannot.
Highlighting and the HTML exports work for long files. A PNG has a maximum size in browsers, so long files are scaled down to fit, and a file too long for one image gets a message suggesting the HTML export or a shorter excerpt.
Databases write strings and quoted names differently. MySQL uses backticks and treats a backslash in a string as an escape, while others do not. Choosing the right dialect makes sure strings end where your database thinks they end, so the colours match how the query is actually read.
No. Highlighting and both exports are produced in your browser. The share link stores only the language, theme and display settings.
Your text is processed locally in the browser. Nothing you paste or open is transmitted or logged.