# Editor.js vs Lexical: the smallest integration against the strictest model

*Source: https://www.editorstack.cc/compare/editorjs-vs-lexical — last updated 2026-09-17. Licensed CC BY 4.0 with attribution to EditorStack.*

## Summary

- Editor.js is a finished block editor you configure; Lexical is a framework for building editors, and our benchmark shows the difference as 5 lines against 25.
- Measured: Editor.js 64.3 kB gzip at 70 ms, Lexical 104.9 kB at 159 ms — both fast, both small, and doing very different amounts of work.
- Choose Editor.js when the requirement is structured blocks and you want them today; choose Lexical when the editing surface is unusual enough that no supplied model fits.

## At a glance

| Product | Type | Licence | Frameworks | Bundle (min+gzip) | Price from | Self-hosted | White label | Score |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| [Editor.js](https://www.editorstack.cc/libraries/editorjs) | library | Apache-2.0 | Any (framework-agnostic) | 64.3 kB gzip | Free (open source) | Yes | Yes | 7.7 |
| [Lexical](https://www.editorstack.cc/libraries/lexical) | library | MIT | Any (framework-agnostic) | 104.9 kB gzip | Free (open source) | Yes | Yes | 7.4 |

## Different products wearing the same word

Both get called "block editors" and only one of them is a product.

Editor.js is an editor: install it, name your tools, get a working editing surface with a plus menu
and block settings. The block model is fixed and the output is JSON.

Lexical is a framework: it gives you an editor state, a node system and a reconciler, and expects you
to build the editor. Blocks are whatever node types you define.

## Where Editor.js wins

**Five lines and 70 ms.** The lowest integration cost in this dataset, and the fastest to render.

**A finished block UI.** Plus menu, block tunes, drag to reorder — present rather than built.

**Smaller**, at 64.3 kB gzip against 104.9 kB.

**Framework-agnostic** in practice as well as in principle; Lexical outside React is community
territory.

**A stable API.** Editor.js's tool contract has been steady for years; Lexical is pre-1.0.

## Where Lexical wins

**Inline-level capability.** Marks, mentions, partial-selection formatting and collaborative cursors —
none of which a block-level API can express.

**A far higher ceiling.** Unusual editing surfaces that are not documents at all are exactly what its
unopinionated node model is for.

**Performance under extreme load**, which is the requirement it was designed around.

**A model you can reason about.** Immutable state and transactions, rather than coordinating
contenteditable regions.

## Who each one is actually for

Editor.js suits a product where content is the point and editing is a means: a help centre, a
knowledge base, a CMS body field. Its constraint — a linear stack of typed blocks — is also its
guarantee.

Lexical suits a product where the editing surface is a competitive feature and the team is prepared to
build it. If nobody on the team can name why the supplied models do not fit, that is a strong
signal to take the five-line option.

## Migration between them

Editor.js to Lexical means defining node types matching your block tools and writing an importer from
your stored JSON — mechanical, and the editor UI is a rewrite.

Lexical to Editor.js is only sensible if your Lexical editor was block-shaped and never used inline
features; otherwise the content does not fit.

## Decision checklist

1. **Is the editing surface a differentiator, or a means to store content?**
2. **Do we need any inline-level feature?** If yes, Editor.js is out.
3. **How large do documents get?**
4. **Is our stack React?** Lexical effectively requires it.
5. **How many engineer-weeks can we give this before a user sees it?**

## The number that matters

Twenty-five lines against five. Both produce an editing surface; only one of them produces an editor,
and the other four-fifths of the code is where the difference lives. The same trade in different
proportions appears in [Tiptap vs Lexical](/compare/tiptap-vs-lexical).


## Frequently asked questions

### Which is faster to integrate?

Editor.js by a wide margin: five lines against twenty-five, and no interface decisions to make before something renders.

### Which handles large documents better?

Lexical, by design. Its immutable state and reconciliation model were built for the scale Meta runs, where Editor.js's contenteditable-per-block approach is not aimed.

### Can Lexical produce block JSON like Editor.js?

It can serialise to any shape you write a serialiser for, including a block array. That is code you own rather than a format the framework gives you.
