Reference guide for adding LTspice symbols to the converter.
symbols.jsonOpen converter.html in any modern web browser. No installation or server needed!
Option A: Drag & Drop — Drag one or more .asy files directly onto the converter page.
Option B: Paste Content — Open your .asy file in a text editor, copy the entire contents, and paste into the left panel.
Click "Convert to JSON". The right panel will show the generated JSON definition and statistics (shapes, pins, symbol name).
Example output (paste-ready for symbols.json):
"opamp": {
"shapes": [
{"type": "line", "x1": -32, "y1": -32, "x2": 32, "y2": 0},
{"type": "line", "x1": -32, "y1": 32, "x2": 32, "y2": 0},
{"type": "line", "x1": -32, "y1": -32, "x2": -32, "y2": 32}
],
"pins": [{"x": -32, "y": -16}, {"x": -32, "y": 16}, {"x": 32, "y": 0}],
"nameOffset": {"x": 16, "y": -16},
"valueOffset": {"x": 16, "y": 16}
}
Click "Copy JSON" to copy the output to your clipboard.
The converter outputs paste-ready JSON, pre-indented to match the symbols.json format:
symbols.json in your text editor"symbols" section}Add common name variations to the "aliases" section so the symbol can be found by different names:
"aliases": {
"opamp": "opamp",
"OpAmp": "opamp",
"OPAMP": "opamp",
"opamp2": "opamp"
}
If you have Node.js installed, you can use the CLI converter for batch processing.
node asy-to-json.js sym/opamp.asy > opamp.json
node asy-to-json.js sym/opamp.asy sym/opamp2.asy > opamps.json
Windows PowerShell:
node asy-to-json.js (Get-ChildItem sym\*.asy).FullName > all-symbols.json
Linux/Mac:
node asy-to-json.js sym/*.asy > all-symbols.json
Then manually copy the relevant symbols from the output file into symbols.json.
For learning or fine-tuning, you can manually convert .asy files.
A typical .asy file looks like this:
Version 4
SymbolType CELL
LINE Normal x1 y1 x2 y2
CIRCLE Normal x1 y1 x2 y2
ARC Normal x1 y1 x2 y2 xStart yStart xEnd yEnd
RECTANGLE Normal x1 y1 x2 y2
PIN x y orientation pinLength
WINDOW 0 x y alignment fontSize
WINDOW 3 x y alignment fontSize
SYMATTR Value R
SYMATTR Prefix R
SYMATTR Description A resistor
LINE Normal → line:
LINE Normal 0 16 32 16
↓
{"type": "line", "x1": 0, "y1": 16, "x2": 32, "y2": 16}
CIRCLE Normal → circle:
CIRCLE Normal 16 16 48 48
↓
Center: cx = (16+48)/2 = 32, cy = (16+48)/2 = 32
Radius: r = (48-16)/2 = 16
{"type": "circle", "cx": 32, "cy": 32, "r": 16}
RECTANGLE Normal → rect:
RECTANGLE Normal 0 0 32 64
↓
{"type": "rect", "x1": 0, "y1": 0, "x2": 32, "y2": 64}
ARC Normal → arcPoints:
ARC Normal 0 16 32 48 4 44 16 16
↓
{"type": "arcPoints",
"x1": 0, "y1": 16, "x2": 32, "y2": 48,
"xStart": 4, "yStart": 44, "xEnd": 16, "yEnd": 16,
"forceLargeArc": false}
forceLargeArc to true for inductor-style coils or arcs that should take the longer path around the ellipse.
PIN 16 0 NONE 0
PIN 16 96 NONE 0
↓
"pins": [{"x": 16, "y": 0}, {"x": 16, "y": 96}]
WINDOW 0 24 16 Left 2 ← InstName position
WINDOW 3 24 104 Left 2 ← Value position
↓
"nameOffset": {"x": 24, "y": 16},
"valueOffset": {"x": 24, "y": 104}
| Type | Description | Properties |
|---|---|---|
line |
Straight line | x1, y1, x2, y2 |
circle |
Circle | cx, cy, r |
rect |
Rectangle | x1, y1, x2, y2 |
arcPoints |
Elliptical arc | x1, y1, x2, y2, xStart, yStart, xEnd, yEnd, forceLargeArc |
Symptom: Arcs appear as small segments or face the wrong direction.
Solution: Adjust the forceLargeArc flag:
{"type": "arcPoints", ..., "forceLargeArc": true}
For inductor coils, ALL arcs typically need forceLargeArc: true.
Symptom: Symbol doesn't align with wires at connection points.
Solution: Double-check pin coordinates match the .asy file exactly. Pins are the electrical connection points and must be precise.
Symptom: Text overlaps symbol or appears on wrong side after rotation.
Solution: This should be handled automatically. If issues persist, verify the nameOffset and valueOffset match the WINDOW commands in the .asy file.
Symptom: Schematic shows "Unknown symbol: xyz".
Solution: Add an alias entry in symbols.json:
"aliases": {
"xyz": "my_symbol_name",
"XYZ": "my_symbol_name"
}