语法高亮

语法高亮: 根据所选编程语言高亮源码标记,不会重新缩进或执行代码。

免费 · 无需注册

文本输入

运行后即可复制或下载结果。

工具选项

关于此工具 语法高亮

根据所选编程语言高亮源码标记,不会重新缩进或执行代码。

输入: 文本. 结果: 在沙盒中预览的 HTML.

示例

点击“试用示例”即可载入公开示例及其设置并运行。

此示例使用的设置
参数示例值输入与选项
语言javascript文本
194 可用选项
  • auto detect
  • 1c
  • abnf
  • accesslog
  • actionscript
  • ada
  • angelscript
  • apache
  • applescript
  • arcade
  • arduino
  • armasm
  • xml
  • asciidoc
  • aspectj
  • autohotkey
  • autoit
  • avrasm
  • awk
  • axapta
  • bash
  • basic
  • bnf
  • brainfuck
  • c
  • cal
  • capnproto
  • ceylon
  • clean
  • clojure
  • clojure-repl
  • cmake
  • coffeescript
  • coq
  • cos
  • cpp
  • crmsh
  • crystal
  • csharp
  • csp
  • css
  • d
  • markdown
  • dart
  • delphi
  • diff
  • django
  • dns
  • dockerfile
  • dos
  • dsconfig
  • dts
  • dust
  • ebnf
  • elixir
  • elm
  • ruby
  • erb
  • erlang-repl
  • erlang
  • excel
  • fix
  • flix
  • fortran
  • freedesktop
  • fsharp
  • gams
  • gauss
  • gcode
  • gherkin
  • glsl
  • gml
  • go
  • golo
  • gradle
  • graphql
  • groovy
  • haml
  • Handlebars
  • haskell
  • haxe
  • hsp
  • http
  • hy
  • inform7
  • ini
  • irpf90
  • isbl
  • java
  • javascript
  • jboss-cli
  • json
  • julia
  • julia-repl
  • kotlin
  • lasso
  • latex
  • ldif
  • leaf
  • less
  • lisp
  • livecodeserver
  • livescript
  • llvm
  • lsl
  • lua
  • makefile
  • mathematica
  • matlab
  • maxima
  • mel
  • mercury
  • mipsasm
  • mizar
  • perl
  • mojolicious
  • monkey
  • moonscript
  • n1ql
  • nestedtext
  • nginx
  • nim
  • nix
  • node-repl
  • nsis
  • objectivec
  • ocaml
  • openscad
  • oxygene
  • parser3
  • pf
  • pgsql
  • php
  • php-template
  • 明文
  • pony
  • powershell
  • processing
  • profile
  • prolog
  • properties
  • protobuf
  • puppet
  • purebasic
  • python
  • python-repl
  • q
  • qml
  • r
  • reasonml
  • rib
  • roboconf
  • routeros
  • rsl
  • ruleslanguage
  • rust
  • sas
  • scala
  • scheme
  • scilab
  • scss
  • shell
  • smali
  • smalltalk
  • sml
  • sqf
  • sql
  • stan
  • stata
  • 步进21
  • stylus
  • subunit
  • swift
  • taggerscript
  • yaml
  • tap
  • tcl
  • thrift
  • tp
  • twig
  • typescript
  • vala
  • vbnet
  • vbscript
  • vbscript-html
  • verilog
  • vhdl
  • vim
  • wasm
  • wren
  • x86asm
  • xl
  • xquery
  • zephir

输入

const answer = 42;

结果

结果会显示在预览区,也可以下载生成的内容进行检查。

参数

参数默认值输入与选项
语言auto detect文本
194 可用选项
  • auto detect
  • 1c
  • abnf
  • accesslog
  • actionscript
  • ada
  • angelscript
  • apache
  • applescript
  • arcade
  • arduino
  • armasm
  • xml
  • asciidoc
  • aspectj
  • autohotkey
  • autoit
  • avrasm
  • awk
  • axapta
  • bash
  • basic
  • bnf
  • brainfuck
  • c
  • cal
  • capnproto
  • ceylon
  • clean
  • clojure
  • clojure-repl
  • cmake
  • coffeescript
  • coq
  • cos
  • cpp
  • crmsh
  • crystal
  • csharp
  • csp
  • css
  • d
  • markdown
  • dart
  • delphi
  • diff
  • django
  • dns
  • dockerfile
  • dos
  • dsconfig
  • dts
  • dust
  • ebnf
  • elixir
  • elm
  • ruby
  • erb
  • erlang-repl
  • erlang
  • excel
  • fix
  • flix
  • fortran
  • freedesktop
  • fsharp
  • gams
  • gauss
  • gcode
  • gherkin
  • glsl
  • gml
  • go
  • golo
  • gradle
  • graphql
  • groovy
  • haml
  • Handlebars
  • haskell
  • haxe
  • hsp
  • http
  • hy
  • inform7
  • ini
  • irpf90
  • isbl
  • java
  • javascript
  • jboss-cli
  • json
  • julia
  • julia-repl
  • kotlin
  • lasso
  • latex
  • ldif
  • leaf
  • less
  • lisp
  • livecodeserver
  • livescript
  • llvm
  • lsl
  • lua
  • makefile
  • mathematica
  • matlab
  • maxima
  • mel
  • mercury
  • mipsasm
  • mizar
  • perl
  • mojolicious
  • monkey
  • moonscript
  • n1ql
  • nestedtext
  • nginx
  • nim
  • nix
  • node-repl
  • nsis
  • objectivec
  • ocaml
  • openscad
  • oxygene
  • parser3
  • pf
  • pgsql
  • php
  • php-template
  • 明文
  • pony
  • powershell
  • processing
  • profile
  • prolog
  • properties
  • protobuf
  • puppet
  • purebasic
  • python
  • python-repl
  • q
  • qml
  • r
  • reasonml
  • rib
  • roboconf
  • routeros
  • rsl
  • ruleslanguage
  • rust
  • sas
  • scala
  • scheme
  • scilab
  • scss
  • shell
  • smali
  • smalltalk
  • sml
  • sqf
  • sql
  • stan
  • stata
  • 步进21
  • stylus
  • subunit
  • swift
  • taggerscript
  • yaml
  • tap
  • tcl
  • thrift
  • tp
  • twig
  • typescript
  • vala
  • vbnet
  • vbscript
  • vbscript-html
  • verilog
  • vhdl
  • vim
  • wasm
  • wren
  • x86asm
  • xl
  • xquery
  • zephir

如何理解结果

格式化调整排版,压缩去除多余空白。输入必须符合对应语法;签名或校验和依赖原始字节时,请保留源文件。

如何使用本页

  1. 粘贴内容或打开本地文件。
  2. 按需调整工具选项,然后点击“运行工具”。
  3. 复制结果或下载原始输出字节。

输入和结果不会自动上传、公开或写入网址。数据处理在浏览器中进行;HTTP 请求和基于 HTTPS 的 DNS 工具会发送你主动运行的网络请求。可打开不超过 128 MiB 的文件,单次输出上限为 64 MiB;部分操作有更低的限制。预览可能截短,下载保留完整输出。文本按 UTF-8 处理,精确字节应通过文件输入。

相关工具

代码整理

操作参考

查看原始技术文档 (English)