ToHTML.com

284 supported languages and formats. Pick one from the dropdown on the main page, or just paste your code and let auto-detect have a go. Where you see a sample button, clicking it runs a short example through the highlighter in a new tab. Missing a language, or found one that colours badly? Let me know. Curious what everyone else pastes? See the most popular languages. Not sure which to pick? Many are auto-detected from your code.
Colour styles available: default, navy, navy-mirror, black, blue, neo, visual, eclipse, mirror, mirice, grayscale, fmx, hs, bred3, far2l, violet.

Programmatic use (API) no key needed

POST your code to https://tohtml.com/ with raw=1 and you get back just the highlighted output, no page around it. Parameters:
# inline-styled HTML
curl --data-urlencode 'code_src=print("hi")' --data 'type=python' --data 'raw=1' https://tohtml.com/

# BBCode for a forum post
curl --data-urlencode '[email protected]' --data 'type=python' --data 'raw=1' --data 'format=bbcode' https://tohtml.com/

# CSS-class HTML (pair with the stylesheet at /css.php?theme=<style>)
curl --data-urlencode '[email protected]' --data 'type=jScript' --data 'raw=1' --data 'format=classes' https://tohtml.com/
Please be reasonable - there is a per-IP rate limit. Identical requests are cached, so re-fetching the same snippet is cheap.

Main languages (26)

Web (30)

XML family (22)

Databases (12)

Assembly (8)

Functional and logic (8)

Hardware description (4)

Scripts, build and automation (45)

Config and INI (6)

Installers (4)

Data and schemas (27)

Legacy and mainframe (15)

Rare and exotic (42)

Editor and tool internals (19)

Other formats (16)