Skip to content

EditorConfig Generator

Presets:

Global [*]

Per-filetype Overrides

[]
[]
.editorconfig
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

[Makefile]
indent_style = tab

Drop this file at your repository root as .editorconfig. Compatible editors apply it automatically; some need the EditorConfig plugin.

What This Tool Does

EditorConfig Generator is built for deterministic developer and agent workflows.

Generate a .editorconfig file with root and per-filetype rules for indentation, charset, line endings, and whitespace.

Use How to Use for execution steps and FAQ for constraints, policies, and edge cases.

Last updated:

This tool is provided as-is for convenience. Output should be verified before use in any production or critical context.

Agent Invocation

Best Path For Builders

Browser workflow

Runs instantly in the browser with private local processing and copy/export-ready output.

Browser Workflow

This tool is optimized for instant in-browser execution with local data handling. Run it here and copy/export the output directly.

/editorconfig-generator/

For automation planning, fetch the canonical contract at /api/tool/editorconfig-generator.json.

How to Use EditorConfig Generator

  1. 1

    Pick a preset or start fresh

    Choose Standard 2-space, Tabs, or Python to prefill sensible defaults, then adjust anything you need.

  2. 2

    Set the global rules

    Configure indent style, size, end-of-line, charset, and whitespace handling for the global [*] section.

  3. 3

    Add per-filetype overrides

    Create sections for globs like *.md or Makefile and set only the keys that should differ from the global rules.

  4. 4

    Review the output

    The .editorconfig text updates live, with root = true already placed at the top of the file.

  5. 5

    Copy or download

    Copy the text or download the file and drop it at your repository root to apply it.

Frequently Asked Questions

What is a .editorconfig file?
It is a small config that tells editors how to format files: indent style and size, line endings, charset, and trailing whitespace. It keeps a team's code consistent across different editors.
How do per-filetype rules work?
Sections like [*.md] or [*.{js,ts}] match file globs and override the global [*] settings only for those files. Add as many overrides as your project needs.
Do all editors support EditorConfig?
Many editors apply .editorconfig natively; others need a small plugin. Either way the same file works across VS Code, JetBrains IDEs, Vim, and more.
Where do I put the file?
Save it as .editorconfig at your repository root. The root = true line stops editors from continuing to search parent folders for more config.
Is anything uploaded?
No. The file is assembled in your browser from the options you select, then copied or downloaded locally. Nothing is sent to a server.