Online R Compiler
Write, run, and share code snippets — no setup required.
Run R online in your browser
A free online R playground and code runner. Write R scripts in your browser, hit Run, and Rscript executes them in seconds. No RStudio, no local R install, no install.packages() wait to configure first.
The editor is built on the same engine as VS Code, so R syntax highlighting, autocompletion, and error squiggles all work. Code runs with Rscript on Alpine Linux, with dplyr, tidyr, stringr, and jsonlite pre-installed — the tidyverse core for data wrangling. Good for exploring a data frame, testing a regex with stringr, or parsing JSON with jsonlite.
What makes this R playground useful
- Instant R execution — write code, press Run, and see output from Rscript in seconds, no
install.packages()wait or RStudio setup needed. - Full R syntax highlighting, autocompletion, and clear error messages with line numbers, powered by the same editor engine as VS Code.
- Stdin input is supported.
readLines('stdin')andfile('stdin')read from the playground's input box, so scripts that take interactive input or parse piped data work end-to-end. No R interpreter, RStudio, or CRAN mirror on your end. - R with dplyr, tidyr, stringr and jsonlite pre-installed — run real tidyverse data-analysis snippets without installing RStudio or the tidyverse locally.
What you can try in the R playground
- Base-R vectors, data frames, and apply-family functions: the foundation you need before reaching for the tidyverse.
- Tidyverse data pipelines: dplyr (filter, mutate, summarise, group_by) composed with the magrittr pipe, and tidyr
pivot_longer/pivot_widerreshapes. - Quick R experiments: test a regex with stringr, parse a JSON blob with jsonlite, verify a statistical summary, or confirm how a grouped
summarisebehaves.
Online R compiler FAQ
Is the online R compiler free?
Do I need R or RStudio installed?
Does the R playground work on mobile and Chromebooks?
Can I use readLines('stdin') in the online R compiler?
readLines('stdin') and file('stdin') read your typed lines the same way they would when you pipe input to Rscript script.R at the terminal. Useful for scripts that process ad-hoc data without a file upload.