Open the app

TRTT › Guides › SPSS Online Compiler: Run SPSS Syntax in Your Browser

SPSS Online Compiler: Run SPSS Syntax in Your Browser

IBM doesn't offer an online compiler for SPSS syntax: SPSS Statistics is a desktop program, and general "online compiler" sites don't know the SPSS language. TRTT is a free browser app with a syntax window that runs a large subset of SPSS commands (FREQUENCIES, CROSSTABS, T-TEST, REGRESSION, COMPUTE, RECODE and many more) on a real .sav file and shows SPSS-style output tables, with the calculations done on your own computer.

It is not the whole SPSS language. The two lists below show exactly what runs and what doesn't, checked against TRTT's parser on 4 October 2026.

Short answer

Try it: a six-line example on the sample dataset

TRTT ships with a sample survey file, demo_omnibus.sav (400 cases, 30 variables), so you can run this without your own data.

  1. Go to trtt.app on a desktop browser.
  2. On the welcome screen, click Sample Dataset.
  3. Open Window ▸ Syntax.
  4. Paste the six lines below and click ▶ Run.
WEIGHT BY weight.
COMPUTE promoter = (nps >= 9).
EXECUTE.
VALUE LABELS promoter 0 'Other' 1 'Promoter (9-10)'.
CROSSTABS /TABLES=gender BY promoter /CELLS=COUNT ROW /STATISTICS=CHISQ.
T-TEST GROUPS=gender(1 2) /VARIABLES=nps.

What happens: the data are weighted by the survey weight, a new 0/1 variable flags respondents who scored 9 or 10 on the likelihood-to-recommend question, the crosstab compares men and women with row percentages and a chi-square test, and the t test compares their mean scores. The Output window shows the Case Processing Summary, the crosstabulation, Chi-Square Tests, Group Statistics and the Independent Samples Test.

Two things worth knowing about how the window behaves:

One TRTT-specific habit: after COMPUTE or RECODE, put EXECUTE. before any command that labels or edits the new variable (as in line 3 above). Procedures such as CROSSTABS pick up new variables without it.

Supported commands

Commands are case-insensitive and can be abbreviated to their first three letters, as in SPSS.

Group Commands
Descriptive statistics FREQUENCIES, DESCRIPTIVES, EXAMINE, CROSSTABS, MEANS, RATIO STATISTICS, MULT RESPONSE
Comparing groups T-TEST, ONEWAY, UNIANOVA, NPAR TESTS
Correlation and regression CORRELATIONS, REGRESSION (linear), PLUM (ordinal)
Scales and dimension reduction RELIABILITY, FACTOR
Classification CLUSTER, QUICK CLUSTER, TWOSTEP CLUSTER, DISCRIMINANT, KNN
Charts GRAPH, GGRAPH with GPL as pasted by the Chart Builder
Transformations COMPUTE, RECODE, COUNT, RANK, AUTORECODE, RMV, SHIFT VALUES, EXECUTE
Cases SELECT IF, FILTER, SPLIT FILE, WEIGHT, SORT CASES
Dictionary VARIABLE LABELS, VARIABLE LEVEL, VARIABLE WIDTH, VALUE LABELS, ADD VALUE LABELS, MISSING VALUES, FORMATS, RENAME VARIABLES, NUMERIC, STRING, ALTER TYPE
Other Comments (* and COMMENT); SET UNICODE and SET LOCALE (accepted, no effect)

Support for a command doesn't mean support for every subcommand. FREQUENCIES, for example, accepts /VARIABLES, /FORMAT and /STATISTICS, but /HISTOGRAM and /PERCENTILES return a "subcommand not yet supported" message. The message always names the part it doesn't understand, so you know what to change.

Not supported (yet)

These commands return "unknown command" or a specific error in TRTT today:

Area Not supported
Control flow DO IF / ELSE IF / END IF, LOOP, DO REPEAT, IF
Restructuring and files AGGREGATE, MATCH FILES, ADD FILES, DATASET commands, TEMPORARY
Procedures LOGISTIC REGRESSION, CTABLES, MIXED, GLM (multivariate and repeated measures; use UNIANOVA for univariate models)
Macros and programmability DEFINE … !ENDDEFINE, BEGIN PROGRAM
Listing LIST, DISPLAY
Opening and saving data GET FILE, SAVE OUTFILE. Use File ▸ Open Data… and File ▸ Save / Save As… instead
Variable lists Ranges with TO (q1 TO q8); list the variables one by one

Two more commands are understood but can't run from the Syntax window in the browser: GET DATA (CSV/Excel import) and SAVE TRANSLATE (CSV/Excel export). A web page can't read or write files at the paths written in syntax, so TRTT points you to File ▸ Import Data… and File ▸ Export…, which produce the same result through the browser's file dialogs.

If your script depends on the commands in this table, run it in SPSS, or try PSPP, the free GNU desktop program that reads SPSS syntax and data files (check its manual for the specific command).

Opening and saving .sps files

Getting syntax from dialogs (Paste)

Every analysis dialog has the same five buttons as SPSS: OK, Paste, Reset, Cancel, Help. Paste writes the command for your current dialog settings into the Syntax window instead of running it. It's the fastest way to learn the syntax for a procedure, and to build a script you can rerun when the data change.

The menus follow the SPSS 32 layout (Analyze ▸ Compare Means and Proportions ▸ Independent-Samples T Test, for example), so instructions written for SPSS usually work click for click.

Translating to R or Python

Below the editor, the Paste panel has three tabs: SPSS, R and Python. After you click Paste in a dialog, the R and Python tabs show code that performs the same analysis, and the Copy button puts it on your clipboard.

The translation aims for the same statistics, not the same printout: an R or Python script may lay out a table differently from SPSS. Treat it as a starting point for learning or for moving a project to code, and compare the key numbers with the TRTT output.

Open TRTT in your browser – free

Related: SPSS alternative online · TRTT vs PSPP · R vs SPSS · SPSS trial expired?

FAQ

Is there an official online version of SPSS syntax?

IBM SPSS Statistics is a desktop application for Windows and macOS; there is no IBM web page where you paste syntax and get output. Browser tools like TRTT run an SPSS-compatible subset instead.

Is my data uploaded when I run syntax in TRTT?

No. The .sav file and the calculations stay in your browser on your own computer. The web app sends anonymous feature-usage counters (not your data), and those are turned off if your browser sends Global Privacy Control or Do Not Track.

Why does my script stop at DO IF or AGGREGATE?

It doesn't stop: TRTT logs "unknown command" for that line and runs the rest. But DO IF blocks, LOOP, AGGREGATE and file merging are not supported yet, so the variables those commands would have created will be missing for later steps.

Can I use TO in variable lists?

Not yet. FREQUENCIES VARIABLES=q1 TO q8. returns an error; write the variables out (q1 q2 q3 …).

Does the syntax window work on iPad or iPhone?

The TRTT iOS app has its own syntax editor with the same engine. The web version is built for desktop browsers. See SPSS for iPad.


TRTT is an independent product. It is not affiliated with or endorsed by IBM. IBM and SPSS are trademarks of International Business Machines Corporation.

More in Guides