We introduce and study the writhe of a permutation, a circular variant of the well-known inversion number. This simple permutation statistics has several interpretations, which lead to some interesting properties. For a permutation sampled uniformly at random, we study the asymptotics of the writhe, and obtain a non-Gaussian limit distribution.This work is motivated by the study of random knots. A model for random framed knots is described, which refines the Petaluma model, studied in [EZHLN16]. The distribution of the framing in this model is equivalent to the writhe of random permutations.