Home › Developer Tools › ASCII Diagram Editor

ASCII Diagram Editor

Sketch architecture, flow and sequence diagrams as plain text: drag to draw boxes and arrows, click to type labels, then copy the result straight into a code comment, commit message or README. Lines join automatically where they meet.

Last updated:

Drag on the grid to draw a box.
Import existing ASCII text
Advertisement
Advertisement

How to use the ASCII Diagram Editor

  1. Pick a line style: ASCII works everywhere; the Unicode styles look sharper in modern editors and on GitHub.
  2. Drag with the Box tool to draw boxes, then switch to Arrow and drag from one box to another.
  3. Add labels with Text: click a cell and type. Enter moves to the next line; Esc finishes.
  4. Rearrange with Select: drag around an area, then drag inside it to move it or press Delete to clear it.
  5. Copy the diagram, optionally wrapped as a Markdown code block or a code comment, or download it as a .txt file.

Box-drawing characters at a glance

PieceASCIIUnicode lightRoundedHeavyDouble
Horizontal-─ U+2500─━ U+2501═ U+2550
Vertical|│ U+2502│┃ U+2503║ U+2551
Corners+┌ ┐ └ ┘╭ ╮ ╰ ╯┏ ┓ ┗ ┛╔ ╗ ╚ ╝
T junctions+├ ┤ ┬ ┴├ ┤ ┬ ┴┣ ┫ ┳ ┻╠ ╣ ╦ ╩
Cross+┼ U+253C┼╋ U+254B╬ U+256C
Arrow heads> < ^ v► ◄ ▲ ▼ (U+25BA, U+25C4, U+25B2, U+25BC)

The Unicode characters come from the Box Drawing block (U+2500 to U+257F). They are designed to fill the whole character cell so lines join without gaps, provided the text is shown in a monospaced font.

Tips for diagrams that survive copy and paste

  • Keep it narrow: about 72 to 80 characters wide fits code review tools, terminals and most style guides' line limits.
  • Use spaces, never tabs: tab width differs between editors, which shifts columns. The editor always exports spaces.
  • Leave a blank column around boxes so labels and arrows stay readable and junctions do not form by accident.
  • Prefer ASCII for terminals and logs; some fonts in older terminals draw Unicode box characters with gaps or at double width.
  • Label arrows, not just boxes: a short verb such as reads, publishes or HTTPS next to each arrow explains the flow.
  • Wrap it in a code block in Markdown, wikis and chat apps so the spacing is preserved.

For diagrams generated from text definitions with automatic layout, try the Mermaid Diagram Editor. To turn tabular data into a text table, use the Markdown Table Generator.

Frequently asked questions

What is an ASCII diagram?

An ASCII diagram is a drawing made only of text characters, such as + - | for boxes and > for arrow heads. Because it is plain text it can live inside source code, terminal output, emails and README files, and it shows up in diffs and code review like any other text.

Should I use the ASCII or the Unicode line style?

Plain ASCII (+ - |) displays correctly in every editor, terminal and font. Unicode box-drawing characters (┌─┐) look cleaner and connect seamlessly, and they render well on GitHub, GitLab and in modern editors, but a few older tools and some fonts may show them unevenly or at a different width.

How do I put the diagram in a README so it keeps its shape?

Choose Wrap as: Markdown code block and paste the result. A fenced code block is shown in a monospaced font with spaces preserved; without it, Markdown collapses the spacing and the diagram falls apart.

How do I add a diagram to a code comment?

Pick the comment style for your language (// for C, Java, JavaScript, Go; # for Python, shell, YAML; -- for SQL and Lua; or a /* */ block) and copy. Every line is prefixed and trailing spaces are removed so linters stay quiet.

How do connected lines get the right corner characters?

Each line character records which directions it connects (up, right, down, left). When you draw over an existing line, the directions are combined and the matching character is chosen, so a line that meets a box edge becomes a T junction and two crossing lines become a cross.

Can I edit a diagram I made earlier?

Yes. Your current drawing is saved in this browser automatically. To edit a diagram from a file or a code comment, paste it under Import existing ASCII text (remove comment markers first) and click Load text into the grid.

Does it work on a phone or tablet?

Yes. Drawing works with touch, and the Scroll tool lets you swipe around a large grid without drawing. A physical keyboard or the on-screen keyboard can be used with the Text tool.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

Mermaid Diagram EditorWrite Mermaid code and see flowcharts, sequence, Gantt and ER diagrams live. Export SVG or PNG.ASCII Art GeneratorTurn text into big ASCII banners or convert any image into ASCII art you can copy.Markdown Table GeneratorBuild Markdown tables in a grid or paste from Excel/CSV, with alignment and preview.ASCII TableFull ASCII code chart 0–255 in decimal, hex, octal, binary and HTML, with search and copy.Online Python CompilerRun Python 3 in your browser with input(), numpy, pandas, charts and share links.JSON EditorEdit JSON in a tree and as code side by side: add, rename, drag, change types, undo and download.Unzip FilesOpen and extract ZIP files online.RAR & 7z ExtractorOpen RAR, 7z and other archives online and extract files.Regex TesterTest and debug regular expressions live.File Info ViewerCheck file size, type, date and MD5/SHA hashes.SQLite ViewerOpen .db and .sqlite files in your browser, browse tables and run SQL queries.DOCX ViewerOpen and read Word .docx files in your browser, then print or save them as HTML.EPUB ReaderOpen and read EPUB e-books in your browser with pages, a table of contents and font controls.What Is My BrowserSee your browser, version, OS, engine, screen and which web features it supports.Font ViewerPreview TTF, OTF, WOFF and WOFF2 fonts with sample text, waterfall, glyphs and metadata.Markdown EditorWrite Markdown with a toolbar, live split preview, autosave and .md or HTML export.Regex Cheat Sheet75+ ready-to-use regex patterns for emails, URLs, IPs and dates, each with a live test box.JavaScript Keycode FinderPress any key to see its JavaScript key, code, keyCode, which, location and modifiers.QR Code ScannerScan QR codes with your camera or from an image and safely read the link or text.RAID CalculatorUsable capacity, efficiency and fault tolerance for RAID 0, 1, 5, 6, 10, 50 and 60 arrays.JSONPath TesterTest JSONPath expressions live: filters, slices, wildcards and recursive search, with matches highlighted.Country Codes ListSearch ISO 3166 alpha-2, alpha-3 and numeric country codes with calling codes and TLDs.CSS Selector TesterTest CSS selectors on your HTML: highlighted matches, match count and specificity.Git Cheat SheetSearchable Git command reference by task, with copy buttons and an undo/rename/fix wizard.HAR File ViewerOpen a .har file to see a waterfall timeline, headers, bodies, timings and size totals.jq PlaygroundRun jq filters on JSON in your browser with live output, flags and an example library.Markdown Cheat SheetInteractive Markdown syntax reference: edit every example and see the live rendered preview.Regex ExplainerPaste a regular expression and get a plain-English breakdown, railroad diagram and flag notes.XPath TesterTest XPath expressions on XML or HTML: highlighted matches, node paths, values and examples.EML File ViewerOpen .eml email files to read the message, headers and raw source and save attachments.Graphviz Online ViewerWrite Graphviz DOT code and render graphs live; switch layout engines, export SVG or PNG.JavaScript Online CompilerWrite and run JavaScript in your browser with a console, timing, error lines and share links.Jupyter Notebook ViewerOpen .ipynb files and read code, Markdown, math, tables, plots and errors without Python.LaTeX Table GeneratorEdit a table like a spreadsheet or paste from Excel and get LaTeX tabular or booktabs code.Log File ViewerOpen huge log files with level colors, regex and time filters, JSON pretty-print and tail -f.Logic Gate SimulatorBuild logic circuits with AND, OR, NOT, XOR gates and flip-flops; see live outputs and truth tables.MSG File ViewerOpen Outlook .msg emails in your browser: sender, recipients, body, headers and attachments.Online Code EditorVS Code-style editor in your browser: tabs, 50+ languages, find/replace, autosave.Sorting Algorithm VisualizerWatch bubble, insertion, merge, quick, heap and radix sort step by step with live counters.Lottie ViewerOpen Lottie JSON or .lottie files to play, pause, scrub frames, change speed and see details.Diff ViewerPaste a git diff or .patch file and view it side by side or inline, with file navigation.EditorConfig GeneratorBuild an .editorconfig with indent, charset, line endings and trim rules per file pattern.Folder Compare ToolCompare two folders by file list, size and SHA-256 hash, then open a text diff of changed files.Glob Pattern TesterTest glob patterns like **/*.js, {a,b} and !exclusions against a list of file paths.JMESPath TesterEvaluate JMESPath expressions against JSON live, the query language used by the AWS CLI.MongoDB Query TesterTest MongoDB find filters, projections and aggregation pipelines on sample JSON documents.Semantic Version CalculatorBump, compare, sort and test SemVer versions against npm ^, ~ and x ranges.XSLT TesterRun an XSLT 1.0 stylesheet on XML in your browser and see the output as HTML, XML or text.DBF File ViewerOpen dBase .dbf files and shapefile tables, search and sort records, export CSV or XLSX.MBOX File ViewerOpen .mbox mail archives: list and search messages, read them, save attachments, export EML.MDB File ViewerOpen Access .mdb and .accdb databases in your browser: list tables, view rows, export CSV.Shapefile ViewerView zipped shapefiles on a map with the attribute table, then export to GeoJSON or CSV.Online Hex EditorOpen any file as hex and ASCII, edit bytes, search, inspect values and save the result.PHP Online CompilerRun PHP 8 code in your browser with output, HTML preview, error lines and share links.PlantUML EditorWrite PlantUML and see sequence, class, activity and more diagrams live. Export SVG or PNG.
See all 53 Code Playgrounds & Testers →