Syntax highlighter for JavaScript

Navigation

Skip navigation.

Site search

Site navigation

Script details

Syntax highlighting JavaScript

This will syntax highlight JavaScript code. The highlighting is based on patterns, it will not test for valid JavaScript. Put your code into the box, and tell it to syntax highlight. It may take a little while to highlight large amounts of code, be patient and let it finish.

The output format is HTML - designed so that you can create a Web page displaying your code.

Highlight your code

TypeColorFont-weight
ModifyDefault
Non keyword: { ( . ) } #000000 
Operators and controls: = new #0000f0
Functions and methods: submit() #aa00ff
Numbers and values: 23.44 false #990000
Variables: myVar #d56000
Strings: 'hfghd' #777777
Regular expressions: /\*\/[\w\W]*/g #8d7f07
Comments: /* multiline */ //single line#008080

To see the script license and check details like browser compatibility, use the links on the navigation panel at the top of this page.

This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.