Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>KY FormatterNew to Visual Studio Code? Get it now.
KY Formatter

KY Formatter

Krishnamohan Yagneswaran

| (0) | Free
KY formatter extension
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

KY Formatter

Automatically formats single-line code blobs the moment you paste them. Paste minified JavaScript, JSON, or HTML on one line — KY Formatter expands it into clean, indented multi-line code.

Sponsor

Features

  • Auto-format on paste: single-line pastes (60+ characters by default) are expanded and indented automatically.
  • JSON support: valid one-line JSON objects/arrays are pretty-printed.
  • HTML support: single-line markup blobs are split tag-per-line with proper nesting.
  • JS/TS/CSS-like support: generic brace/semicolon formatter that respects '...', "...", and `...` strings.
  • Manual command: KY Formatter: Format Single-Line Selection from the Command Palette formats the selection (or current line).
  • Safe by default: plain English text (no { } ; or HTML tags) is left untouched; Markdown and plaintext are excluded.

Extension Settings

This extension contributes the following settings:

  • ky-formatter.enable: Enable/disable KY Formatter.
  • ky-formatter.formatOnPaste: Automatically format single-line code blobs when pasted.
  • ky-formatter.minLength: Minimum pasted single-line length that triggers auto-format (default 60).
  • ky-formatter.maxLength: Maximum pasted length to consider — protects against huge pastes (default 50000).
  • ky-formatter.useEditorIndent: Use the active editor tabSize/insertSpaces for indentation.
  • ky-formatter.excludedLanguages: Language IDs where paste auto-format is disabled (default ["markdown", "plaintext"]).

Sponsor

If KY Formatter saves you time, consider supporting its development:

☕ Sponsor — Buy Me a Coffee

You can also run KY Formatter: Sponsor (Buy Me a Coffee) from the Command Palette.

Known Issues

  • The generic formatter does not parse comments specially; ; or braces inside comments may split lines.
  • Very exotic syntaxes fall back to the generic brace formatter, which may not match your project's style — run your project formatter afterwards if needed.

Release Notes

0.0.1

Initial release: auto-format single-line pastes (JSON, HTML, brace-style code), format-selection command, and sponsor link.


Enjoy!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft