Generate a Hilbert Curve
Draw a Hilbert space-filling curve for a chosen order
Last updated: September 17, 2026
Order n visits 2^(2n) cells. Maximum order 8 (65536 points).
Examples:
- Order 1 → 4 points (simple U shape)
- Order 3 → 64 points
- Order 6 → 4096 points (dense space-filling look)
Result actions
Copy or download the tool output, or share a link to Generate a Hilbert Curve.
Get new tools in your inbox
An occasional email when we ship new free tools. No spam, unsubscribe anytime.
Related tools
Generate a Sierpinski Triangle
Draw the Sierpinski triangle fractal at a chosen recursion depth
Visualize an L-System
Expand and draw Lindenmayer systems with turtle graphics
Calculate Number Sum
Paste a list of numbers and get the sum, count, and average
Draw Pascal's Triangle
Generate Pascal's triangle with binomial coefficients for any row count
Generate Look and Say Sequence
Generate Conway's look-and-say sequence from any digit seed
Generate Pi Digits
Generate any number of digits of π with high precision
What is a Hilbert Curve?
A Hilbert curve is a continuous fractal space-filling curve that visits every cell of a square grid while preserving locality better than a simple scanline order.
Why Generate It?
- Education: Show recursive space-filling constructions
- Algorithms: Illustrate locality-preserving indexes
- Art: Produce dense geometric patterns
How This Tool Works
Pick an order n. The tool maps each index 0…2^(2n)−1 to a grid coordinate with the classic Hilbert rotation algorithm and strokes the path on a canvas in your browser.
Related Tools
- Visualize an L-System: Turtle-graphics fractals
- Generate a Sierpinski Triangle: Triangle gasket fractal
- Draw Pascal's Triangle: Binomial coefficient arrays