Convert D2 to TXT
Turn D2 files into TXT. The main board drawn as text with Unicode box-drawing lines and arrows in the default layout, with the labels of shapes and connections written in.
Converted in an isolated sandbox on our serversDeleted after 24 hours
Drop D2 files on the dialor turn it to pick what to do
Your D2 diagram as text.Boxes and arrows are drawn with Unicode lines, with every label written in.
What you get
One TXT file with the main board drawn as text. Shapes become boxes and connections become lines and arrows, all made from Unicode box-drawing characters in the default layout.
The labels of shapes and connections are written into the drawing, so you can read the diagram without opening D2.
What changes or is left out
Markdown, LaTeX and code blocks come out as empty boxes. The box is there, but the content is not.
Wide characters such as Korean get spaces between them. A label can also run into a line.
Layers, scenarios and steps are left out, so only the main board is drawn. Colors and styles are left out too.
D2 and TXT.What each format is.
The formats
D2 Diagram
Diagram code in the D2 language: boxes, arrows and containers.
- Extensions
- .d2
- MIME type
- text
/x -d2 - Kind
- Text and data
Plain Text
Plain text with no formatting at all. The smallest, most portable form of a document.
- Extensions
- .txt .log
- MIME type
- text
/plain - Kind
- Text and data
In your code.The same D2 to TXT conversion through the API, for your app or your agent.
$ cv convert report.d2 report.txt$ cv convert report.d2 report.txtQuestions.What people ask about D2 to TXT.
Yes. Connections are drawn as lines and arrows, and the labels of shapes and connections are written in.
Markdown, LaTeX and code blocks come out as empty boxes. Their content is not written into the text.
No. Only the main board is drawn. Layers, scenarios and steps are left out.
Wide characters such as Korean get spaces between them in the text drawing.