JWT Decoder for Django
Paste any JWT to decode it instantly — then use the djangorestframework-simplejwt code examples below to implement JWT authentication in your Django REST Framework application.
100% in-browser — nothing uploadedEncoded JWT
Decoded Header
Paste a token to decode this segment.
Decoded Payload
Paste a token to decode this segment.
Verify Signature
Features
100% private
Your token is decoded entirely in your browser. Nothing is uploaded, logged, or sent to any server or API.
Instant decoding
Paste a JWT and the header, payload, and claims are decoded in real time — no button required.
Human-readable claims
Standard claims like exp, iat, and nbf are explained and shown as readable dates with expiry status.
Signature verification
Verify HS256/384/512 with a secret, or RS, PS, and ES algorithms with a public key — all client-side.
How to implement JWT authentication in Django
The most popular JWT library for Django REST Framework is djangorestframework-simplejwt (pip install djangorestframework-simplejwt). It provides token obtain, refresh, and verify endpoints out of the box, and a JWTAuthentication class that validates Bearer tokens on incoming requests. Configure it in settings.py as a DEFAULT_AUTHENTICATION_CLASS and protect views with IsAuthenticated permission.
Simple JWT issues access tokens (short-lived, default 5 minutes) and refresh tokens (long-lived, default 1 day). Access tokens are signed with HS256 using the Django SECRET_KEY by default, or you can configure a separate SIGNING_KEY. Custom claims can be added by subclassing AccessToken and registering a custom serializer. The SIMPLE_JWT settings dict in settings.py controls all token lifetimes and behavior.
Use the decoder above to inspect Django Simple JWT tokens during development — paste the access token from a response to view the user_id, token_type, and other claims. The snippet below shows the configuration and usage patterns.
Django — djangorestframework-simplejwt
python# settings.py
REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': [
'rest_framework_simplejwt.authentication.JWTAuthentication',
],
}
SIMPLE_JWT = {
'ACCESS_TOKEN_LIFETIME': timedelta(minutes=15),
'REFRESH_TOKEN_LIFETIME': timedelta(days=1),
'ALGORITHM': 'HS256',
'SIGNING_KEY': SECRET_KEY,
}
# urls.py
from rest_framework_simplejwt.views import (
TokenObtainPairView, TokenRefreshView
)
urlpatterns = [
path('api/token/', TokenObtainPairView.as_view()),
path('api/token/refresh/', TokenRefreshView.as_view()),
]
# views.py
from rest_framework.permissions import IsAuthenticated
class ProfileView(APIView):
permission_classes = [IsAuthenticated]
def get(self, request):
return Response({'user': str(request.user)})How to decode a JWT token online
Paste your token
Copy a JSON Web Token and paste it into the encoded box. You can also load the example token to try it out.
Read the decoded data
The header and payload are decoded instantly. Switch to the Claims tab for plain-English explanations and expiry status.
Verify the signature
Enter the secret (HMAC) or public key (RSA/ECDSA) to confirm the token is authentic and hasn't been tampered with.