A local-first browser tool for reverse engineering, documenting, and inspecting printed circuit boards.
Privacy Note: This application runs 100% in your browser. All images and data are stored in your browser's local database (IndexedDB). No project data (photos, BOM, nets, schematics) is uploaded to any PCB ReTrace server. The pages do load libraries (OpenCV, zip.js, the routing engine) from public CDNs and use Google Analytics for usage statistics. The only way project content can leave your browser is the optional AI feature (section 6): if you set up an AI profile and press Send, the crops you selected go directly from your browser to the provider you chose, and that provider's terms apply. Identification without AI (marking and package databases) sends nothing anywhere.
1. Concept & Hierarchy
PCB ReTrace organizes data to match physical hardware:
Device: The physical unit (e.g., "Multimeter Model X").
Board: A specific PCB inside the device (e.g., "Mainboard", "Power Supply").
Images: Photos of the board (Top, Bottom, Angled shots).
2. The Workflow
Step 1: Setup
Create a New Device and a New Board using the top menu. Then, add your images: upload files or take a photo with the camera (📷). Before saving, you can crop and rotate the picture. High-resolution, flat photos work best.
Step 2: Mapping Components (BOM)
Navigate to the Images tab. Click on a component in the photo to mark it.
The app switches to the BOM list.
Enter the Reference (e.g., R1).
If identifying the value requires calculation, click the tool icon to open the built-in decoders (Resistor Bands, Inductors).
If you cannot tell what a part is (an SMD transistor, a small IC, an unknown capacitor), click the ✨ button next to the Value field. PCB ReTrace cuts the part out of your photos and helps you identify it, with an AI of your choice or, without AI, by looking up the marking code in an offline database. It can fill in the value, package and description for you. See chapter 6.
Step 3: Tracing Nets
Use the Inspect and Nets tabs to document connectivity.
Smart Naming: Click near a component to add a node. If the component is defined in the BOM, the tool auto-suggests the label (e.g., R1.1) using geometry (Angle & Distance). It automatically accounts for board rotation and flips pin logic for Bottom-side images.
Pinout Help: Click the button in the naming dialog to view standard conventions (e.g., "Stripe = Pin 1" for Tantalum).
New Net: If no net is currently active, entering a name for a node will automatically start a new net.
Trace overlay: Once a net has two or more pins, PCB ReTrace routes the connections automatically and draws them over every image, including the images of the other side (projected through the stitching). The active net is amber, other nets are light blue. Use Inactive Traces to hide the other nets and Re-route to recalculate all nets.
Correcting nodes: Click a node to rename or delete it. Drag a blue (directly placed) node to move it; green nodes are projections from another image.
Checking nets: The Nets tab flags nodes that are not in Ref.Pin format (e.g. R1.1), nodes used in more than one net, and empty nets. Press the Issues button to show only the problems; Fix on a net offers to delete it, rename a node, or merge it into the net it conflicts with.
Export: In the Nets tab, you can export a .net (KiCad) and .cir (SPICE) netlist to help verify your reverse engineering in a professional EDA tool. For a drawn schematic, see Step 4.
Step 4: Schematic Generation (Schema ReTrace)
Switch to the Schema tab to automatically generate a schematic diagram from your traced nets.
Auto Layout: Schema ReTrace uses a built-in routing engine to organize components and draw wires intelligently.
Interactive Editing: Drag components to rearrange them. Right-click (or long-press on mobile) to rotate, mirror or replace the symbol. Shortcuts: R rotate, X/Y mirror, F fit the view, Ctrl+Z (or ↩) undo, Esc deselect, Up/Down arrows select the previous/next component or net. The Properties panel lets you edit the value and pin count, and for KiCad symbols shift or remap the pins.
Re-route vs. Auto Layout:Re-route only redraws the wires and keeps your positions. Auto Layout discards the positions you set by hand (after asking for confirmation) and places everything again. Both can be undone.
KiCad Libraries: Click "Libraries" to import actual .kicad_sym libraries (or ZIP files) and assign standard symbols to your components. Imported libraries are managed in ⚙ Settings → Symbol libraries. A component's symbol can be reset to the generic one from its context menu.
Resolve symbols: The 🧩 button assigns KiCad symbols to many components at once, based on selectors and rules (see chapter 7).
KiCad schematic export: Use Export: KiCad .kicad_sch to preview, copy or download the diagram as a KiCad 8 schematic: symbols, positions, wires, junctions and the BOM values.
Standalone Mode: You can use this tool independently by visiting schema.html to visualize any standard KiCad .net or SPICE .cir netlist.
3. Computer Vision & Stitching
PCB ReTrace uses Computer Vision (CV) for Spatial Alignment. It allows you to synchronize the view across different images.
Important: The CV engine does not automatically recognize components (it won't read "10k" off a resistor). Its purpose is to mathematically align coordinates between images so you can see through the board.
Auto-Stitch (Same Side)
When you upload a new image, PCB ReTrace automatically attempts to stitch it against existing images on the board in the background. If features match (e.g., a close-up vs. a wide shot), connections are created automatically.
You can also run this manually:
Open Image Settings on your Main image.
Select Stitch / Connections -> Run Auto-CV.
Manual Stitch (Top vs. Bottom)
To create an "X-Ray" view where clicking a pin on the Top automatically shows the corresponding pin on the Bottom:
Select your Top Image.
Go to Image Settings -> Connections.
Find your Bottom Image and click "Edit Stitch".
Flip Target: Click the button. This mirrors the bottom image horizontally.
Match Points: Click 4 common features (Vias, Holes, Corners) visible on both images.
Click Save Match.
4. Tools
PCB ReTrace includes standalone calculators accessible from the BOM editor:
Coil: Calculator for hand-wound air-core inductors.
5. Data Management
Device Export (ZIP): Full backup: all boards, images, BOM, nets, stitching and schematic layouts, plus the KiCad symbols those layouts use. You can protect it with a passphrase (AES-256).
Board Export (ZIP): The same for a single board.
Encrypted ZIPs:README.txt stays readable; everything else needs the passphrase. Open them with 7-Zip (Windows), The Unarchiver or Keka (macOS) or p7zip / GNOME Archive Manager (Linux). The built-in macOS Archive Utility and the Linux unzip command cannot open AES-256 ZIPs. PCB ReTrace asks for the passphrase itself when you import such a file.
Import: Use the 📂 button, drag and drop a ZIP (or an image) onto the window, or use 🌐 to load a ZIP from a URL. If the device or board already exists, a newer copy replaces the local content (items missing from the file are removed), while an older copy only adds what is missing.
CSV Export: Standard spreadsheet export of the BOM for ordering.
KiCad netlist (.net) and SPICE (.cir): From the Nets tab: identified components and traced nets, for use in PCB design software or simulators.
KiCad schematic (.kicad_sch): From the Schema tab (see Step 4).
Never exported: API keys and vaults, the AI request log, the marking database and the package catalogue.
Storage:⚙ Settings → Storage shows (approximately) how much space photos, libraries and databases use, and lets you ask the browser for persistent storage so it does not evict your data when space runs low.
6. Identifying Components (with or without AI)
Click the ✨ button next to the Value field in the BOM editor. The component must have been placed on an image (click it on the Images tab). PCB ReTrace first cuts the same physical area out of every stitched photo of the same side of the board. You can then either send the crops to an AI, or look the part up without AI.
Identification without AI
Press Search by marking (no AI) on the first screen. Type the code printed on the part (for example W1M), optionally the package and the type. The list shows devices from the offline marking database, each with a picture of its package. Look-alike characters (0/O, 1/I, 5/S, 8/B, W/M) are tried too and marked, because several devices can share one code: compare the package picture and your photos before pressing Use. Nothing is sent anywhere.
Identification with AI
Choose images: untick images you do not want to send, change the Area (S/M/L/XL or the slider), zoom with the wheel or a pinch and drag a preview to re-centre it. Images of the other side are available but not selected.
Review: you see where the images will be sent (provider host, model, fallbacks), the exact crops and the exact prompt. Optionally add a hint such as "electrolytic capacitor". Nothing is sent until you press Send to AI.
Result: check and edit the type, value, package, marking and the KiCad selector. The package is shown as a footprint picture with alternatives you can click. Apply to form only fills the Value and Description fields; you still press Save. If the model reports the part was cut off, Use suggested crop returns to step 1 with a tighter area.
Description selectors
For passive parts the Value holds the electrical value (10k, 100nF); for transistors, diodes, ICs and other named parts it holds the part name (PMBT3904), so it appears on the schematic.
The description gets a trailing bracketed selector that the Schema symbol picker uses as its default search, for example SOT-23 NPN General Purpose Transistor [name:PMBT3904 pins:3]. Supported keys: lib:, name:, ref:, desc: (substring match), fp: (package family, e.g. fp:SOT-23; also matches SOT-23-3, and symbols without footprint information are kept) and pins: (exact pin count). Without pins: the number of traced pins is used; with it, a symbol with more pins than were traced is accepted and the extra pins are added unconnected. You can type the same keys in the symbol search box.
Setting up AI and credentials
Open ⚙ Settings → AI, add a profile (Gemini, Claude, OpenAI, OpenRouter, a custom OpenAI-compatible URL such as Ollama, or Open WebUI), use Fetch list to see the models your key can use, and press Test.
The first profile becomes the default; add more as fallbacks (used if a request fails or a quota is exhausted).
API keys are stored encrypted in a vault (Security & Credentials): choose a passphrase (more secure) or a device key (no prompts; protects copied browser profiles and backups, not malicious scripts). Keys are never exported with your data.
On narrow screens the ⚙ button takes the place of the ? button; Help is inside the Settings dialog.
Privacy: a hosted AI service (Google, Anthropic, OpenAI, OpenRouter, ...) receives the crops and the prompt and handles them under its own terms. Retention, logging and use for model training differ by provider and plan, and free tiers often allow training use. Avoid sending sensitive boards unless you have checked the terms. Only a model running on a server you operate (Ollama, Open WebUI ...) keeps the images on your own machines.
Marking database and package catalogue
⚙ Settings → Part markings holds an offline table (CSV or ZIP with the columns marking, part_number, package, component_type, manufacturer, description). ⚙ Settings → Packages holds a catalogue of common packages (SOT-23, 0603, SOIC-8, TO-92 ...) taken from the KiCad footprint libraries: a 2D picture with pad numbers, pad count, pitch and size. Both are imported automatically in the background the first time they are needed (at startup, when the identify dialog opens, or when you open their Settings page) and then work offline. If you delete one, it is not downloaded again until you import it. They stay in your browser and are never part of exports. With AI, matching devices appear as clickable chips in the result, and Ask again with database matches sends them to the model as hints.
7. Symbol mapping: Resolve & Rules
A generated schematic first draws components as generic rectangles. The 🧩 Resolve symbols button in the Schema view replaces them with KiCad symbols. It shows a preview of what will be assigned (and what is left alone) and asks for confirmation; one Undo reverts the whole batch.
For every component that still has a generic symbol, PCB ReTrace decides in this order:
A selector in the BOM description, for example [name:PMBT3904 pins:3], if it matches exactly one symbol.
Your global rules (first match wins), for example Reference C → Device:C, or Reference C and description contains electrolytic/tantalum → Device:C_Polarized.
The Value, if it equals a symbol name exactly (for example LM358).
Components that already have a KiCad symbol are never changed, and a symbol is only used if it has enough pins for the connected pins. The rotation of 2-pin parts is adjusted so a resistor that was horizontal stays horizontal.
Rules are edited in ⚙ Settings → Symbol mapping: reference letters, optional description words, an optional value pattern, and the symbol (searchable with lib:, name:, fp:, pins:; the symbols themselves are managed in ⚙ Settings → Symbol libraries). They apply to all devices and boards. Resolve newly generated components automatically is off by default; when you turn it on, only components that appear for the first time in a schematic are resolved, never existing diagrams.
8. Sharing & Deep Links
You can share a device setup by hosting the exported ZIP file on a public server and creating a "Deep Link" to it.