FloorPlanner - 2D and 3D Floor Design Tool

A browser-based 2D and 3D floor plan designer with a drag-and-drop furniture library, real-time 3D preview, measuring tools, undo/redo history and one-click export to PNG, SVG and JSON.

Version: 1.0 Type: HTML / CSS / Vanilla JS + Three.js Backend required: None License: Regular / Extended Support

#Introduction

Welcome to Floor Planner β€” a complete, professional floor planning tool that runs entirely inside the browser. Sketch walls, create rooms, drop in doors, windows, stairs and over 20 categories of furniture, then switch to the 3D view to explore your design in real time. Everything is stored locally in your browser β€” no server, no database, no sign-up.

Because the application is 100% static, it can be hosted on any web server, run from a local folder, or be embedded into an existing website.

2D plan view
2D design canvas
3D preview
Real-time 3D preview
Apartment 2D
Multi-room apartments
Apartment 3D
Explore from any angle

#Features

πŸ–ŠοΈ

Vector 2D Canvas

Crisp, resolution-independent 2D editor with a smart grid, snapping and dynamic dimension read-outs.

πŸ—οΈ

Walls, Rooms & Openings

Draw walls, define rooms, cut doors and windows straight into walls with adjustable sizes.

πŸ›‹οΈ

Furniture Library

20+ furniture types β€” beds, sofas, tables, kitchens, bathrooms, stairs and columns β€” drag & drop.

🧩

Custom Object Builder

Stack coloured boxes, cylinders & spheres to build your own 3D objects, preview live, and save to your library.

🧊

Real-time 3D

Three.js-powered 3D scene auto-generated from your plan. Orbit, zoom and pan freely.

πŸ“

Measurement Tools

Measure tool with live length, plus live wall length and room area totals in the header.

↩️

Undo / Redo

Full clipboard and undo/redo history so you can experiment without fear.

πŸ“€

Export Anywhere

Export plans as PNG, scalable SVG, WebGL-backed 3D PNG or a JSON project file.

πŸ’Ύ

Auto-Save

Your design is auto-saved to localStorage every 5 seconds and restored on open.

πŸ“‹

No Backend

Zero dependencies on your server β€” works from any static host or even a local file server.

#File Structure

floor-planner/
β”œβ”€β”€ index.html                  # Main application (single page)
β”œβ”€β”€ css/
β”‚   └── styles.css              # Dark professional UI theme
β”œβ”€β”€ js/
β”‚   β”œβ”€β”€ elements.js             # Element defaults + furniture definitions
β”‚   β”œβ”€β”€ history.js              # Undo / redo manager
β”‚   β”œβ”€β”€ editor2d.js             # 2D canvas editor (tools, snapping, hit-testing)
β”‚   β”œβ”€β”€ editor3d.js             # Three.js 3D scene builder + orbit controls
β”‚   β”œβ”€β”€ app.js                  # Main controller: tools, properties, export, demo scenes
β”‚   └── vendor/                 # Three.js r128 + OrbitControls (included, MIT)
β”œβ”€β”€ assets/
β”‚   └── preview/                # Promotional screenshots + thumbnails
β”œβ”€β”€ Documentation/              # This documentation

Three.js r128 and its OrbitControls module are bundled locally in js/vendor/, so the application works completely offline β€” no CDN requests are made at runtime.

#Requirements

Web ServerAny static host (Apache, Nginx, cPanel/Hosting, GitHub Pages, Vercel, Netlify, local)
BrowserChrome, Edge, Firefox, Safari (recent versions)
JavaScriptEnabled, ES2017+ (all modern browsers)
InternetNone β€” all libraries, including Three.js, are bundled locally
Backend / DatabaseNot required β€” client side only
No database Designs are stored in the browser's localStorage. No login, no PHP, no MySQL.

#Local Installation

Unzip floor-planner.zip on your computer. You can run the app two ways:

Option A β€” Python local server (recommended)

Open a terminal inside the floor-planner/ folder and run:

cd floor-planner
python3 -m http.server 8080

Open http://localhost:8080 in your browser.

Option B β€” Any static server

Use any tool you already have, for example:

# Node
npx serve .
# PHP
php -S localhost:8080
Local files Loading the page directly via file:// may work for viewing, but a local HTTP server guarantees the cleanest behaviour for exports, 3D screenshots and auto-save.

#Hosting a Live Demo

  1. Upload the contents of the floor-planner/ folder to your web host (cPanel public_html, an Nginx/Apache docroot, GitHub Pages, Vercel or Netlify).
  2. Open your-domain.com/index.html.
  3. Done β€” no configuration files or database migrations needed.

You can also point visitors straight at a demo scene:

your-domain.com/index.html?demo=house      # Modern house example
your-domain.com/index.html?demo=office     # Office layout example
your-domain.com/index.html?demo=apartment  # Apartment example
your-domain.com/index.html?demo=house&view=3d  # Open straight into 3D

#Getting Started

Try the demo

Open the app and load a ready-made scene from the File menu, or append a demo URL parameter (see the previous section).

Typical workflow

  1. Draw the outline β€” select the Wall tool and click point-to-point to trace the outer walls.
  2. Add rooms β€” pick the Room tool and drag a rectangle inside the walls, then fine-tune dimensions in the properties panel.
  3. Cut openings β€” select the Door or Window tool and click on a wall to insert an opening.
  4. Furnish β€” drag furniture items from the right-hand library onto the plan.
  5. Style β€” select any element and edit color, size, rotation and height.
  6. View in 3D β€” click the 3D button in the header and orbit around the result.
  7. Export β€” use the Export menu to save PNG / SVG / JSON.
Floor Planner interface

#Tools Guide

Select tool (V)

Click an element to select it and show its properties in the right sidebar. Drag to move, use arrow keys to nudge, [/] to rotate. Wall endpoints get draggable edit handles when selected.

Wall tool (W)

Click to place the start point, then click again to finish the segment. Walls snap to 15Β° angles β€” hold the mouse over the canvas to see live length and angle.

Room tool (R)

Drag a rectangle to create a room. Set its color, opacity and wall height in the properties. Room area is counted in the header total.

Door tool (D)

Click directly on a wall to place a door with swing animation in 3D. Adjust width and swing direction via properties or R rotation.

Window tool (N)

Click on a wall to place a window. Set sill height so it sits correctly in the 3D wall.

Measure tool (M)

Click two points to display a live measurement with units. Temporary guides are drawn in cyan.

Snapping All drawing tools snap to the 20px grid. Hold a modifier-free click to draw β€” release to finish.

#Furniture Library

The panel on the right lists every furniture type. Drag an item onto the canvas or click it and place it with a click. Every item is fully resizable and recolourable.

CategoryAvailable items
SeatingSofa (2 & 3 seat), armchair, office chair, dining chairs
TablesCoffee table, dining table (4 & 6 seats), counter
SleepingQueen bed, single bed, nightstand, wardrobe, dresser
Storage & MediaBookshelf, TV stand
Kitchen & BathKitchen counter, sink, bathtub, shower tray, toilet
StructureColumn, stairs, straight wall, room

#Custom Objects (Object Builder)

Besides the built-in furniture, you can design your own 3D objects by composing simple primitives β€” boxes, cylinders and spheres β€” each with its own size, position, rotation and color. A live 3D preview updates as you edit so you always see exactly what you are building.

How it works

  1. In the right-hand Furniture Library panel click + New Custom Object.
  2. Use Start from template to load a Table, Floor Lamp, Potted Plant or Lounge Chair, or build from scratch.
  3. Add parts with the Box / Cylinder / Sphere buttons. Click a part in the list to select it, then edit its X / Y / Z offsets, rotations and color.
  4. Use ⧉ (duplicate), × (delete), β–² / β–Ό (reorder) buttons next to the tools.
  5. Orbit the preview (drag), zoom (scroll) and inspect the design from every angle.
  6. Give it a name and click Save to Library.
  7. The object appears under My Custom Objects. Click it (or drag it) onto the canvas, then check it in the 3D view.

Part coordinate system

Parts are positioned in object-local space: X runs along the footprint width, Y is height measured from the floor (0 = ground), and Z runs along the footprint depth. Rotations are in degrees around the part's own centre.

Editing placed objects Select any placed custom object and press Edit Object in its properties to reopen it in the builder. Saving updates every placed copy's geometry.
Self-contained Every placed custom object stores its parts inside the project, so exported/imported JSON files render the object exactly as designed β€” even on another computer.
Custom Object Builder

#Properties Panel

Selecting any element opens its properties on the right side:

  • Color β€” picker for walls, rooms, floors and furniture materials.
  • Dimensions β€” width, depth/length, height and thickness in px (100 px = 1 m).
  • Rotation β€” fine control in degrees.
  • Special values β€” wall height, window sill height, room opacity, stair step count.
  • Delete β€” remove the selected element.

#Context Menu

Right-click on the canvas to open the context-sensitive menu:

  • Add Door / Add Window β€” right-click on a wall to insert an opening at that spot.
  • Delete β€” remove the element under the cursor.
  • Copy / Paste / Duplicate β€” clipboard operations (also on Ctrl/Cmd keys).

#3D Navigation

Switch to the 3D view with the 3D button in the header. The scene rebuilds automatically from your plan β€” walls gain height, rooms become floors, and furniture is rendered as styled 3D meshes with real rotation.

ActionMouse / Touch
Orbit cameraLeft mouse drag / single touch drag
PanRight mouse drag or two-finger drag
ZoomMouse wheel / pinch
Auto-fit planClicks into 3D automatically frames the whole plan once
Tips Use the Grid toggle in the header to show/hide the ground grid. Use the Camera reset (or reload with &cam=120) to change the default viewing angle.
3D view

#Import / Export

The Export menu offers four formats:

FormatDescription
PNG (plan)Rasterized 2D plan at 3Γ— resolution for sharp prints.
SVGScalable vector plan β€” print and edit in any vector tool.
PNG (3D)WebGL screenshot of the current 3D camera.
JSON projectFull project file with all elements. Re-open with the Import menu item.

Import a previously exported .json project from the File β†’ Import dialog.

#Keyboard Shortcuts

KeyAction
VSelect tool
WWall tool
RRoom tool
DDoor tool
NWindow tool
MMeasure tool
Arrow keysNudge selected element
[ / ]Rotate selected element βˆ’/+ 15Β°
DeleteDelete selected element
Ctrl/Cmd + ZUndo
Ctrl/Cmd + Y / Shift+ZRedo
Ctrl/Cmd + CCopy selected
Ctrl/Cmd + VPaste
Ctrl/Cmd + XCut selected

#URL Parameters

ParameterValuesEffect
?demo=house / office / apartmentLoads a ready-made sample design
&view=2d / 3dStarts in the given view
&cam=degrees (e.g. 150)Rotates the 3D camera azimuth on load

#Customization & Extending

Theme colors

The entire UI is styled by CSS custom properties in css/styles.css. Change --bg, --accent and friends to rebrand instantly.

Adding a furniture item

Open js/elements.js and add an entry to FURNITURE_DEFS. Provide the code that builds the 2D thumbnail handled by editor2d, and a matching builder in editor3d.js that returns a THREE.Group. Each definition supports name, w, d, h, color.

{
  name: "My Couch",
  type: "my_couch",
  w: 180, d: 90, h: 80,
  color: "#ef9e4f",
  category: "seating"
}

Default scene

The demo scenes are functions in js/app.js (_sceneHouse, _sceneOffice, _sceneApartment). Edit them or add new ones and register the id in the AppScenes map.

Scale

The app works in px where 100 px = 1 m. Area and measurement readouts already convert to mΒ² / m automatically.

#Browser Support

  • Google Chrome & Chromium (recommended)
  • Microsoft Edge
  • Mozilla Firefox
  • Apple Safari 14.1+
  • Opera & other Chromium-based browsers

WebGL & 3D compatibility

The 3D view requires WebGL (hardware or software accelerated). If WebGL is unavailable the 3D tab shows a friendly warning and the 2D editor keeps working β€” the failure is isolated and never freezes the whole application.

Browsers without WebGL: enable it under settings, update the browser, or check that the GPU / driver is not blocked by an enterprise policy. In Firefox check about:support β†’ β€œWebGL”. In Chrome check chrome://gpu.

Hardware acceleration should be left on β€” if it is disabled, 3D performance drops and rendering may fall back to the software rasterizer (still functional, but slower).

Testing was performed under headless Chromium (WebGL via SwiftShader) β€” all built-in smoke tests pass.

#Troubleshooting & FAQ

Common setup errors

β€œBlank page” or missing toolbar after install

Cause: the page was opened directly from the zip via file://, or the js/ folder was renamed / partially uploaded.

Fix: fully unzip the package, keep the css, js and index.html files together, then serve the folder over HTTP: python3 -m http.server 8080 (or npx serve .) and open http://localhost:8080.

β€œ3D view is unavailable” message

Cause: the bundled Three.js library did not load or WebGL is not available in the browser (hardware acceleration off, blocked GPU, or very old browser).

Fix: check that js/vendor/three.min.js and js/vendor/OrbitControls.js were uploaded next to the other scripts, enable hardware acceleration, update the browser, or test in another browser. The 2D editor keeps working regardless.

Saves don’t persist after reload

Cause: the auto-save key floor-planner-last was cleared, private/incognito mode, or the page is opened via file:// in a browser that blocks localStorage for local files.

Fix: serve over HTTP instead of file://, and use a normal browsing window. Always export a JSON backup (Export β†’ Save as JSON) if you switch browsers or clear data.

Files won’t download (Export does nothing)

Cause: a pop-up blocker, browser download policy, or file:// access.

Fix: allow downloads for the site, retry from an HTTP URL (http://localhost:8080), and try each export format individually. If JSON export works but images don’t, check that the canvas/WebGL contexts are rendering (see the developer console).

Canvas / 3D appears stretched or squeezed

Fix: press the browser zoom reset (Ctrl/Cmd+0) and refresh. The renderer auto-sizes on window resize and when switching views.

Resetting your project (clearing browser storage)

The application auto-saves your design to the browser’s localStorage under the key floor-planner-last every 5 seconds and restores it on reload. To start from a blank project, clear that saved state:

  1. Open the app, press F12 (or Cmd+Alt+I on Mac) to open DevTools.
  2. Go to the Application panel β†’ localStorage (Chrome/Edge) or the Storage tab (Firefox).
  3. Click http://localhost:8080 (or your host) in the left list.
  4. Delete the entry named floor-planner-last (right-click β†’ Delete, or click it then press the πŸ—‘ Delete button).
  5. Reload the page β€” the canvas is now empty. Alternatively, press Ctrl/Cmd+Shift+R after deleting, or use Clear site data to remove all data for the site.
JS one-liner From the console you can do the same thing instantly: localStorage.removeItem('floor-planner-last'); location.reload();

FAQ

Do I need a database or backend?

No. Everything runs in the browser β€” no PHP, MySQL or build tools.

Does the app need internet?

No. Three.js and OrbitControls are bundled in js/vendor/, so the app works fully offline from the moment you open it. Internet is only needed if you host the live demo yourself.

Can I convert / edit the exported SVG?

Yes β€” the SVG is a plain vector file you can open in Illustrator, Inkscape or any vector editor.

Can I change the unit scale?

The editor works in px where 100 px = 1 m. Area and length readouts convert to m² / m automatically. See Customization & Extending.

My 3D view is slow β€” what can I do?

Reduce the browser window size (the renderer matches the canvas), enable hardware acceleration, and avoid overly dense custom objects. You can hide the ground grid with the Grid toggle.

#Credits

3D RenderingThree.js r128 (MIT license, bundled in js/vendor/)
IconsEmoji glyphs & inline SVG
FontsSystem font stack
Support For questions, bug reports or feature suggestions please use the item support tab on CodeCanyon. Replies are usually sent within 24 hours.