Ed in the browser

Try the text editor in your browser. Why? I don't know

This page runs GNU ed in your browser. Try it by typing commands in the input field above.

Ed is a text editor from a time computer consoles resembled typewriters called teletypes. Some have called it the most user-hostile editor ever created. You can’t see the document and it replies an unhelpful ? to almost everything.

Ed had to work around the fact that characters typed on paper can’t be edited directly. Paper also doesn’t have a cursor to move around like on a fancy terminal. Instead the user addresses line numbers and issues single character commands such as (a)ppend, (c)hange or (d)elete that operate on entire lines. Check the man page.

For an authentic teletype experience I have changed the input field to behave as a line buffer. Backspace moves the cursor back one space and removes the character from memory, but not from paper. The input field also hijacks some keyboard shortcuts common for line buffers when active.

This project is a curiosity to simulate what it was like to edit text on a teletype and share that experience with others. Note that ed is the spiritual predecessor of vi. Some commands you might recognize.

Porting the C source to the browser was easy using Emscripten. Check the repository to see how this works.

Updated November 7, 2025