safetensors Viewer

Open .safetensors files in your browser and inspect the tensors inside, names, shapes and dtypes, and page through values, all without a Python environment or loading the model. Nothing is uploaded.

Free, no sign-up, and fully client-side. Your file never leaves your browser. Opens .safetensors.

Open the viewer and drop a file to get started.

What is a safetensors file?

safetensors is the format Hugging Face uses to store model weights safely. Unlike a Python pickle it cannot execute code on load, and its layout is dead simple: a JSON header listing each tensor’s name, dtype and shape, followed by the raw tensor bytes. That makes it fast to open and safe to share.

ViewKit reads the JSON header instantly and lets you browse every tensor, then reads an individual tensor’s bytes only when you open it. It is a quick way to check what is in a checkpoint, the tensor names, shapes and dtypes, without downloading a framework. Nothing is uploaded.

What you can do with the safetensors viewer

Tensor index

List every tensor with its shape and dtype straight from the header, even for multi-gigabyte checkpoints.

Lazy value reads

A tensor’s data is read only when you open it, so the index appears instantly.

ML dtypes

float16, bfloat16, float32/64, and the integer and boolean types used in model weights all decode correctly.

Slice & heatmap

Inspect a tensor as a table or heatmap and slice higher-dimensional tensors with the dimension mapper.

How to open a safetensors file

  1. 1

    Drop your .safetensors file onto the box above (or click to browse). It is read in your browser, nothing uploads.

  2. 2

    Browse the list of tensors with their shapes and dtypes.

  3. 3

    Open a tensor to inspect its values as a table or heatmap.

Doing the same thing in code

Listing the tensors in Python:

Python
from safetensors import safe_open

with safe_open("model.safetensors", framework="pt") as f:
    for key in f.keys():
        t = f.get_slice(key)
        print(key, t.get_shape(), t.get_dtype())

The framework argument means the reader returns framework tensors, so listing a header that is plain JSON usually requires PyTorch to be installed. This page reads the header directly and lists the tensor names, shapes and dtypes.

safetensors viewer: frequently asked questions

Can it open large checkpoints?

Yes. Only the header is read up front, and each tensor’s bytes are read on demand, so even multi-gigabyte files list their tensors instantly.

How is safetensors different from a .bin or .pt checkpoint?

A .bin or .pt file is usually a Python pickle, and loading a pickle executes code stored in the file. safetensors was designed to avoid this: the file is a JSON header plus raw tensor bytes, with nothing executable in it. This is also why its contents can be listed in a browser.

Can I inspect a sharded checkpoint?

Large models are split into parts like model-00001-of-00003.safetensors, with an index JSON mapping each tensor name to its shard. Open any shard to see the tensors it holds. There is no need to reassemble the model first.

Does it support bfloat16?

Yes, bfloat16, float16, float32 and float64, and the common integer and boolean dtypes are all decoded.

Is the model uploaded?

No. The header and any tensor you open are read entirely in your browser; nothing is sent to a server.

Also view in ViewKit