EMBEDDED TOOL
Arduino Syntax Highlighter
Highlight Arduino/C++ code and copy it as colored HTML or plain text.
About this tool
Paste an Arduino sketch or C++ snippet to get color syntax highlighting you can view full-screen, or copy as ready-to-paste HTML (for a blog post, forum answer, or documentation page) alongside the plain, unhighlighted text.
Highlighting runs entirely in your browser using Prism.js — nothing is uploaded.
Frequently asked questions
- What does "Copy as HTML" give me?
- The highlighted markup (with Prism's
tokenclass names) as raw HTML — paste it into a page that includes Prism's CSS to reproduce the same coloring, or adapt the classes to your own site's styles. - Does this check whether my sketch would compile?
- No — it's a highlighter, not a compiler. It colors code based on C/C++ syntax patterns (keywords, types, strings, comments), Arduino-specific functions included, even if the code has errors.
- Does it recognize Arduino-specific functions like digitalWrite?
- Yes — this uses Prism's Arduino grammar, a C++ variant that additionally recognizes core Arduino API functions and constants (like
digitalWrite,HIGH,OUTPUT) as a distinct token type.