Generate Paperfolding Sequence
Create dragon curve sequence values. Runs entirely in your browser, so your data never leaves your device.
Output
The result appears here as you type.
How to use Generate Paperfolding Sequence
- 1. Set how many terms. Enter How many terms to decide how many folds of the paperfolding sequence to compute, each term recording whether that crease folds up or down when a strip of paper is repeatedly folded in half.
- 2. Set a separator. Choose Separator, a comma or newline, to shape the output for a plain list or spreadsheet column.
- 3. Copy the results. The tool computes the regular paperfolding sequence, the pattern behind the dragon curve fractal. Copy the resulting 1s and 0s for your fractal or sequence work.
When to use Generate Paperfolding Sequence
Generate Paperfolding Sequence produces the sequence of fold directions you get from repeatedly folding a strip of paper in half, the same pattern that traces out the dragon curve fractal. Reach for it whenever you need this sequence without physically simulating the folds.
- Drawing a dragon curve fractal. Someone building a turtle graphics or SVG rendering of the dragon curve needs the underlying paperfolding sequence to determine whether to turn left or right at each segment.
- Studying automatic sequences. A student learning about sequences generated by finite automata wants verified terms of the paperfolding sequence to compare against a 2-automatic sequence they built by hand.
- Testing a fold-simulation function. A developer who wrote code to simulate repeated paper folds and record fold directions validates the output against this generated sequence to confirm the simulation logic is correct.
- Cross-referencing OEIS A014577. Someone reading about the connection between this sequence and the dragon curve regenerates the early terms here to confirm they match the source they are studying.
Examples
The first ten terms
Output
1, 1, 0, 1, 1, 0, 0, 1, 1, 1
About the Generate Paperfolding Sequence tool
Generate Paperfolding Sequence runs as plain JavaScript in your browser tab, with no server behind it. Create dragon curve sequence values. Whatever you put in stays on your device from start to finish.
The tool is part of EditSafely's Math Tools section, 234 single-purpose utilities built around the same idea: open the page, get the result, keep your data to yourself.
You can shape the output with 2 settings, including How many terms and Separator, and the result refreshes the moment you change one. A worked example further down the page shows exactly what the tool produces for a real input.
That local-first design has practical benefits beyond privacy. The tool keeps working on a flaky connection once the page has loaded, results are instant because nothing round-trips to a server, and it is safe to use with confidential material.
Frequently asked questions
Does Generate Paperfolding Sequence cost anything?
Yes, it is completely free. All 2,658 tools on EditSafely work without an account, a subscription or usage limits.
Does the generator send anything to a server?
No data leaves your device. The whole tool is JavaScript that runs inside your browser tab, so there is no upload, no server-side processing and no log of what you did. If you disconnect from the internet after the page loads, it keeps working.
How do I get a different result?
Run the generator again. Each run is computed fresh on your device, and any options you change are applied to the next result immediately.
Do I need to sign up or install anything?
Nothing to install and no account needed. Open the page in any up-to-date browser, including on a phone or tablet, and the tool is ready.
How do I use the result?
The output panel has a one-click copy button, and you can keep refining the input while you work; the result updates in place as you type.