Line break(code wrap) not working in jupyter notebook

Hi, Does anyone knows how to make it work. Sometimes line break works in jupyter notebook and sometimes it doesn’t.

It also tried this method mentioned in Stackoverflow but it is still not working.

Does anyone know any permanent solution for this?

Can you share your notebook? And, at which box of notebook does the line break or code wrap does not work?

Did you follow the above mentioned stackoverflow guide?

It’s the last line in the jupyter notebook.

Image -

The changes I made in thejupyter config file according to StackOverflow.

Alright. I will need some time to figure this out.

1 Like

I am unable to use the


However, setting the word wraps on jupyter labs settings is easier.

Workable settings

To launch jupyter labs

jupyter notebook data_cleaning_part1.ipynb 

Click on the top menu “Settings” -> select “Advanced Editor Settings” -> click on “Settings” tab -> Under “User Overrides”




    "codeCellConfig": {
        "lineWrap": true

If you want to restore the default “User Overrides”, replace to


Documentation does not work

According to jupyter notebook documentation on persisting configuration settings,

Persisting configuration settings

Under the hood, Jupyter will persist the preferred configuration settings in ~/.jupyter/nbconfig/<section>.json , with <section> taking various value depending on the page where the configuration is issued. <section> can take various values like notebook , tree , and editor . A common section contains configuration settings shared by all pages.

I tried putting

    "codeCellConfig": {
        "lineWrap": true

and saving as notebook.json or editor.json.

It apparently does not work. Maybe I am missing some steps.