What Is a Touchstone File?
Touchstone (also written as Touchstone®, originally from EEsof/Agilent) is the de-facto standard plain-text file format for storing frequency-domain N-port S-parameter data. The file extension indicates port count: .s1p, .s2p, .s3p, .s4p … .s50p. Almost every VNA, EM simulator, and RF EDA tool can read and write Touchstone files.
File Structure
! Comment lines start with ! # [freq unit] [parameter type] [data format] R [reference impedance] Examples: # GHz S DB R 50 → GHz, S-parameters, dB+angle, 50 Ω reference # MHz S MA R 50 → MHz, magnitude+angle, 50 Ω # Hz S RI R 50 → Hz, real+imaginary, 50 Ω
Options Line Details
| Field | Options | Default |
|---|---|---|
| Frequency unit | Hz, kHz, MHz, GHz, THz | GHz |
| Parameter type | S, Y, Z, H, G | S |
| Data format | DB (dB+angle°), MA (mag+angle°), RI (real+imag) | MA |
| R impedance | Any positive real (Ω) | 50 |
Data Format for a .s2p File (DB format)
freq S11_dB S11_ang S21_dB S21_ang S12_dB S12_ang S22_dB S22_ang Example row: 1.0000 -0.5 170.2 -12.3 -45.6 -35.1 -48.2 -0.8 165.4 (Freq = 1 GHz, S11 = −0.5 dB at 170.2°, S21 = −12.3 dB at −45.6°, etc.)
Port Ordering for Multi-Port Files
For N-port files (N > 2), each frequency block has multiple rows. The Touchstone 1.0 convention is row-major order:
.s4p: 4 rows per frequency point Row 1: freq S11 S21 S31 S41 Row 2: S12 S22 S32 S42 Row 3: S13 S23 S33 S43 Row 4: S14 S24 S34 S44 Touchstone 2.0 (.ts): supports mixed-mode, more ports, keywords
Common Issues with SNP Files
| Issue | Symptom | Fix |
|---|---|---|
| Wrong format in options line | Phase wrapped 180° | Check MA vs DB vs RI |
| Wrong port count | Only S11 available | Save from VNA as .s2p not .s1p |
| Wrong reference impedance | S11 offset from expected | Renormalize to 50 Ω |
| Mismatched frequency points | Cannot overlay files | Frequency resample before compare |
| Non-physical data (|S21|>0dB passive) | Calibration error | Recalibrate VNA |
Touchstone 2.0 Extensions
Touchstone 2.0 (IEEE P370) adds: keyword-based header, support for noise parameters, mixed-mode (differential/common-mode) parameters, and variable reference impedances per port. Most modern VNAs export Touchstone 1.0; some export 2.0 for differential measurements.