Code Style Highlighter

Quick code highlighting and customization with a variety of themes and options online.

Designed for bloggers who write about programming


Many sites contain a code listing on their pages, which can vary in its highlighting depending on the syntax of the language. Code highlighting allows you to improve the visual perception of information on the site. If your site also has highlighted code, then Dockunit can help with syntax highlighting.

The Dockunit service is designed for bloggers who write about programming. You can paste the code into the input field above, choose your programming language and design style. Optionally, you can add row numbers to the result.

After clicking on the Process button, you'll get an HTML code ready to paste into your blog, which you can easily copy by clicking on the Copy HTML and CSS button.

This tool works with 208 programming languages and 45 themes. Creates beautiful and convenient code snippets to insert into your blog without the need to connect third-party JavaScript libraries.

Syntax highlighting

Syntax highlighting on pages with CSS and JS is primarily designed to make the code more readable, and a complementary checker will help identify errors. Also, on pages with CSS and JavaScript automatic substitution of some characters works, which will help to reduce code writing time a little and get rid of errors with missing or forgotten brackets.

Syntax highlighting is the work of code editors such as Sublime Text, Visual Studio, Dev CPP, etc. Which highlight all the different parts of the source code based on their syntax by color, modified fonts, or through graphical modifications. Since these days, color highlighting is integrated into all common editors and development areas. Highlighting does not affect code performance, but it makes life easier for developers. Syntax highlighting improves source code readability for developers.

Syntax highlighting is a feature of text editors that are used for programming, scripting, or markup languages, such as HTML. The feature displays text, especially source code, in different colours and fonts according to the category of terms. This feature facilitates writing in a structured language such as a programming language or a markup language as both structures and syntax errors are visually distinct. This feature is also employed in many programming related contexts (such as programming manuals), either in the form of colorful books or online websites to make understanding code snippets easier for readers. Highlighting does not affect the meaning of the text itself; it is intended only for human readers.

Syntax highlighting is a form of secondary notation, since the highlights are not part of the text meaning, but serve to reinforce it. Some editors also integrate syntax highlighting with other features, such as spell checking or code folding, as aids to editing which are external to the language.

Syntax highlighting is a feature that is used for programming, scripting or markup languages such as HTML. The function displays text, especially source code, in different colors and fonts according to the category of terms. This function makes it easier to write in a structured language such as a programming or markup language, because the two structures and syntax errors are visually different. This feature is also used in many programming-related contexts (such as programming manuals) or in the form of colorful books or online sites to make it easier for readers to understand portions of code. Emphasis does not affect the meaning of the text itself; it is intended only for readers.

Syntax emphasis is a form of secondary notation, since emphasis is not part of the meaning of the text, but serves to reinforce it. Some editors also combine highlighting with other functions, such as spell checking or code collapsing, as editing aids, external to the language.

Practical benefits

Some text editors can also export colored markup in a format suitable for printing or importing into word processing and other kinds of text formatting software; for example, as HTML, colorized LaTeX, PostScript, or RTF versions of syntax highlighting. There are several syntax highlighting libraries or "engines" that can be used in other applications but are not themselves complete programs, such as the Generic Syntax Highlighter (GeSHi ) extension for PHP.

For editors that support more than one language, the user can usually specify a text language, such as C, LaTeX , HTML , or the text editor can automatically recognize it by file extension or by scanning the contents of the file. This automatic language detection presents potential problems. For example, a user may want to edit a document containing:

In these cases, it is unclear which language to use, and the document may not be highlighted or may not be highlighted correctly.

Syntax elements

Most editors with syntax highlighting allow you to assign different colors and text styles to dozens of different lexical syntax subelements. These include keywords, comments, control flow statements, variables, and other elements. Programmers often tweak their parameters a lot, trying to show as much useful information as possible without making it hard to read the code.

Some editors, called "syntax embellishment," also display certain syntactic elements in a more visually pleasing way, for example. by replacing a pointer operator such as -> in the source code with an actual arrow symbol (→) or changing the design of cue text such as / italics /, * boldface * or _underline_ in the source code encode comments with actual italics, boldface or underline presentation.

History and limitations

The ideas of syntax highlighting largely overlap. One of the first such code editors was Wilfred Hansen's 1969 code editor, Emily. It provided an advanced language-independent means of completing code and, unlike modern editors with syntax highlighting, made it virtually impossible to create syntactically incorrect programs.

In 1982, Anita H. Klock and Jan B. Chodak filed a patent for the first known syntax highlighting system, which was used in the IntellivisionEntertainment Computer System (ECS) peripheral released in 1983. It highlighted various elements of BASIC programs and was implemented in an attempt to make it easier for beginners, especially children, to start writing code. Later, the Live Parsing Editor (LEXX), written for the VM operating system to computerize the Oxford English Dictionary in 1985, was one of the first to use color-coded syntax highlighting. The dynamic parsing capability allowed user-provided parsers to be added to the editor for text, programs, data files, etc. etc. On microcomputers, MacPascal 1.0 (October 10, 1985) recognized Pascal syntax as it was typed. and used font changes (such as bolding keywords) to highlight syntax on the monochrome compact Macintosh and automatic indentation in the code to match its structure.

Some text editors and code formatting tools perform syntax highlighting using pattern-matching heuristics (e.g. Regular Expressions ) instead of implementing a parser for every possible language. This can cause the text rendering system to display somewhat inaccurate syntax highlighting and, in some cases, to be slow. The solution used by text editors to overcome this problem is not always to parse the entire file, but rather only the visible area, sometimes scanning the text backwards to a limited number of lines to "sync".

On the other hand, an editor often displays code at the time of its creation, even though it is incomplete or incorrect, and strict parsers (such as those used in compilers) cannot analyze code most of the time.

Some modern, language-dependent IDEs (as opposed to text editors) perform syntax analysis on the whole language, leading to a very accurate understanding of the code. The extension of syntax highlighting was called "semantic highlighting" in 2009 by David Nolden for the C ++ open source IDE KDevelop . For example, semantic highlighting can give local variables unique distinctive colors to improve code understanding. In 2014, the idea of colored local variables was further popularized by a blog post by Evan Brooks, and after that the idea was carried over to other popular IDEs such as Visual Studio , Xcode , and others.

Have questions?
Contact Us


Which programming languages are supported?

Dockunit supports 208 programming languages:

  • ABAP
  • ABNF
  • ActionScript
  • ActionScript 3
  • Ada
  • AL
  • Angular2
  • ApacheConf
  • APL
  • AppleScript
  • Arduino
  • ArmAsm
  • Awk
  • Ballerina
  • Base Makefile
  • Bash
  • BashSession
  • Batchfile
  • BibTeX
  • BlitzBasic
  • BNF
  • Brainfuck
  • C
  • C#
  • C++
  • Caddyfile
  • Caddyfile Directives
  • Cap'n Proto
  • Cassandra CQL
  • Ceylon
  • CFEngine3
  • cfstatement
  • ChaiScript
  • Cheetah
  • Clojure
  • CMake
  • CoffeeScript
  • Common Lisp
  • Coq
  • Crystal
  • CSS
  • Cython
  • D
  • Dart
  • Diff
  • Django/Jinja
  • Docker
  • DTD
  • Dylan
  • EBNF
  • Elixir
  • Elm
  • EmacsLisp
  • Erlang
  • Factor
  • Fennel
  • Fish
  • Forth
  • Fortran
  • FortranFixed
  • FSharp
  • GAS
  • GDScript
  • Genshi
  • Genshi HTML
  • Genshi Text
  • Gherkin
  • GLSL
  • Gnuplot
  • Go
  • Go HTML Template
  • Go Text Template
  • GraphQL
  • Groff
  • Groovy
  • Handlebars
  • Haskell
  • Haxe
  • HCL
  • Hexdump
  • HLB
  • HTML
  • HTTP
  • Hy
  • Idris
  • Igor
  • INI
  • Io
  • J
  • Java
  • JavaScript
  • JSON
  • Julia
  • Jungle
  • Kotlin
  • Lighttpd configuration file
  • LLVM
  • Lua
  • Mako
  • markdown
  • Mason
  • Mathematica
  • Matlab
  • mcfunction
  • Meson
  • Metal
  • MiniZinc
  • MLIR
  • Modula-2
  • MonkeyC
  • MorrowindScript
  • Myghty
  • MySQL
  • NASM
  • Newspeak
  • Nginx configuration file
  • Nim
  • Nix
  • Objective-C
  • OCaml
  • Octave
  • OnesEnterprise
  • OpenSCAD
  • Org Mode
  • PacmanConf
  • Perl
  • PHP
  • Pig
  • PkgConfig
  • PL/pgSQL
  • plaintext
  • Pony
  • PostgreSQL SQL dialect
  • PostScript
  • POVRay
  • PowerQuery
  • PowerShell
  • Prolog
  • PromQL
  • Protocol Buffer
  • Puppet
  • Python
  • Python 2
  • QBasic
  • QML
  • R
  • Racket
  • Ragel
  • Raku
  • react
  • ReasonML
  • reg
  • reStructuredText
  • Rexx
  • Ruby
  • Rust
  • SAS
  • Sass
  • Scala
  • Scheme
  • Scilab
  • SCSS
  • Sieve
  • Smalltalk
  • Smarty
  • Snobol
  • Solidity
  • SQL
  • SquidConf
  • Standard ML
  • Stylus
  • Svelte
  • Swift
  • systemverilog
  • TableGen
  • TASM
  • Tcl
  • Tcsh
  • Termcap
  • Terminfo
  • Terraform
  • TeX
  • Thrift
  • TOML
  • TradingView
  • Transact-SQL
  • Turing
  • Turtle
  • Twig
  • TypeScript
  • TypoScript
  • TypoScriptCssData
  • TypoScriptHtmlData
  • verilog
  • VHDL
  • VimL
  • vue
  • XML
  • Xorg
  • YAML
  • YANG
  • Zig
Show all
Which styles are supported?

Dockunit supports 45 styles:

  • Abap
  • Algol
  • Algol Nu
  • Arduino
  • Autumn
  • Base16 Snazzy
  • Borland
  • Bw
  • Colorful
  • Doom One
  • Doom One2
  • Dracula
  • Emacs
  • Friendly
  • Fruity
  • Github
  • Hr High Contrast
  • Hrdark
  • Igor
  • Lovelace
  • Manni
  • Monokai
  • Monokailight
  • Murphy
  • Native
  • Nord
  • Onesenterprise
  • Paraiso Dark
  • Paraiso Light
  • Pastie
  • Perldoc
  • Pygments
  • Rainbow Dash
  • Rrt
  • Solarized Dark
  • Solarized Dark256
  • Solarized Light
  • Swapoff
  • Tango
  • Trac
  • Vim
  • Vs
  • Vulcan
  • Xcode
  • Xcode Dark